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 251046 eaf74551577b2747db5409620e3157b96f9a25d6
parent 251045 cd1ae92f1ed9aad4dad820044df5eb8f6cca6239
child 251047 c9bfddb928fc7fca45dce17edf19f9d78f7c3d9c
push id698
push userjlund@mozilla.com
push dateMon, 23 Mar 2015 22:08:11 +0000
treeherdermozilla-release@b0c0ae7b02a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin, test-only
bugs1117979
milestone37.0a2
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);