Bug 995806 - test_DirectoryLinksProvider.js xpcshell test makes tcp connection to example.com [r=mcmanus]

Point to localhost instead of nosuchhost for tests.
This commit is contained in:
Maxim Zhilyaev 2014-06-06 11:02:55 -07:00
Родитель 32686a9f3b
Коммит 79bcb4d3f4
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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);