From 79bcb4d3f47d3931a26e3747fc67130fb60c49a8 Mon Sep 17 00:00:00 2001 From: Maxim Zhilyaev Date: Fri, 6 Jun 2014 11:02:55 -0700 Subject: [PATCH] Bug 995806 - test_DirectoryLinksProvider.js xpcshell test makes tcp connection to example.com [r=mcmanus] Point to localhost instead of nosuchhost for tests. --- toolkit/modules/tests/xpcshell/test_DirectoryLinksProvider.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolkit/modules/tests/xpcshell/test_DirectoryLinksProvider.js b/toolkit/modules/tests/xpcshell/test_DirectoryLinksProvider.js index 92a74cc29b16..a44647c0eb0d 100644 --- a/toolkit/modules/tests/xpcshell/test_DirectoryLinksProvider.js +++ b/toolkit/modules/tests/xpcshell/test_DirectoryLinksProvider.js @@ -205,7 +205,7 @@ add_task(function test_fetchAndCacheLinks_malformedURI() { add_task(function test_fetchAndCacheLinks_unknownHost() { yield DirectoryLinksProvider.init(); yield cleanJsonFile(); - let nonExistentServer = "http://nosuchhost"; + let nonExistentServer = "http://nosuchhost.localhost"; try { yield DirectoryLinksProvider._fetchAndCacheLinks(nonExistentServer); do_throw("BAD URIs should fail"); @@ -286,7 +286,7 @@ add_task(function test_DirectoryLinksProvider__prefObserver_url() { // tests these 2 things: // 1. _linksURL is properly set after the pref change // 2. invalid source url is correctly handled - let exampleUrl = 'http://nosuchhost/bad'; + let exampleUrl = 'http://nosuchhost.localhost/bad'; yield promiseDirectoryDownloadOnPrefChange(kSourceUrlPref, exampleUrl); do_check_eq(DirectoryLinksProvider._linksURL, exampleUrl);