Bug 1117979 - Fix orange by not relying on DNS lookup failure in the 'error' test. r=gavin, a=test-only
authorMark Hammond <mhammond@skippinet.com.au>
Thu, 22 Jan 2015 12:13:23 +1100
changeset 242995 e7d732bf6091
parent 242994 4036f72a0b10
child 242996 3096b7b44265
push id4357
push userryanvm@gmail.com
push date2015-01-22 19:21 +0000
treeherdermozilla-beta@3096b7b44265 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin, test-only
bugs1117979
milestone36.0
Bug 1117979 - Fix orange by not relying on DNS lookup failure in the 'error' test. r=gavin, a=test-only
toolkit/components/search/tests/xpcshell/test_location_error.js
--- a/toolkit/components/search/tests/xpcshell/test_location_error.js
+++ b/toolkit/components/search/tests/xpcshell/test_location_error.js
@@ -15,20 +15,19 @@ function run_test() {
 
   do_get_file("data/engine.xml").copyTo(engineDir, "engine.xml");
 
   do_register_cleanup(function() {
     removeMetadata();
     removeCacheFile();
   });
 
-  // this will cause an "unknown host" error, but not report an external
-  // network connection in the tests (note that the hosts listed in
-  // server-locations.txt are *not* loaded for xpcshell tests...)
-  let url = "https://nocert.example.com:443";
+  // using a port > 2^32 causes an error to be reported.
+  let url = "http://localhost:111111111";
+
   Services.prefs.setCharPref("browser.search.geoip.url", url);
   Services.search.init(() => {
     try {
       Services.prefs.getCharPref("browser.search.countryCode");
       ok(false, "not expecting countryCode to be set");
     } catch (ex) {}
     // should have an error recorded.
     checkCountryResultTelemetry(TELEMETRY_RESULT_ENUM.ERROR);