Bug 1115440 - Don't rely on preference values for firefox. r=markh
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Mon, 29 Dec 2014 13:43:30 -0800
changeset 247366 9688ae38ccc42d74b442a280aa7f430543baf30b
parent 247365 d2a8dd9105778e84240db9505350333988eea811
child 247367 927ca48b5f2978fbf0b6a337663a2c9a02a293af
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh
bugs1115440
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1115440 - Don't rely on preference values for firefox. r=markh
toolkit/components/search/tests/xpcshell/head_search.js
--- a/toolkit/components/search/tests/xpcshell/head_search.js
+++ b/toolkit/components/search/tests/xpcshell/head_search.js
@@ -200,17 +200,21 @@ function isSubObjectOf(expectedObj, actu
       do_check_eq(expectedObj[prop], actualObj[prop]);
     }
   }
 }
 
 // Expand the amount of information available in error logs
 Services.prefs.setBoolPref("browser.search.log", true);
 
-// Disable geoip lookups
+// The geo-specific search tests assume certain prefs are already setup, which
+// might not be true when run in comm-central etc.  So create them here.
+Services.prefs.setBoolPref("browser.search.geoSpecificDefaults", true);
+Services.prefs.setIntPref("browser.search.geoip.timeout", 2000);
+// But still disable geoip lookups - tests that need it will re-configure this.
 Services.prefs.setCharPref("browser.search.geoip.url", "");
 
 /**
  * After useHttpServer() is called, this string contains the URL of the "data"
  * directory, including the final slash.
  */
 let gDataUrl;