Bug 1192555 - browser_urlbarSearchSuggestionsNotification.js should force unifiedComplete. r=post-facto-test-only
authorMarco Bonardo <mbonardo@mozilla.com>
Sat, 08 Aug 2015 23:39:06 +0200
changeset 256999 f78f4abd2f03c1a781a136528f31dbed7b45bb04
parent 256998 d2da80a77302e0da22d33f440d7fc848b56e15da
child 257000 dc44b9a3b5427f9fd281c49ecbad7af3eb09f0df
push idunknown
push userunknown
push dateunknown
reviewerspost-facto-test-only
bugs1192555
milestone42.0a1
Bug 1192555 - browser_urlbarSearchSuggestionsNotification.js should force unifiedComplete. r=post-facto-test-only
browser/base/content/test/general/browser_urlbarSearchSuggestionsNotification.js
--- a/browser/base/content/test/general/browser_urlbarSearchSuggestionsNotification.js
+++ b/browser/base/content/test/general/browser_urlbarSearchSuggestionsNotification.js
@@ -1,19 +1,22 @@
 const SUGGEST_ALL_PREF = "browser.search.suggest.enabled";
 const SUGGEST_URLBAR_PREF = "browser.urlbar.suggest.searches";
 const CHOICE_PREF = "browser.urlbar.userMadeSearchSuggestionsChoice";
 const TEST_ENGINE_BASENAME = "searchSuggestionEngine.xml";
 
 // Must run first.
 add_task(function* prepare() {
+  // The test makes only sense if unified complete is enabled.
+  Services.prefs.setBoolPref("browser.urlbar.unifiedcomplete", true);
   let engine = yield promiseNewSearchEngine(TEST_ENGINE_BASENAME);
   let oldCurrentEngine = Services.search.currentEngine;
   Services.search.currentEngine = engine;
   registerCleanupFunction(function () {
+    Services.prefs.clearUserPref("browser.urlbar.unifiedcomplete");
     Services.search.currentEngine = oldCurrentEngine;
     Services.prefs.clearUserPref(SUGGEST_ALL_PREF);
     Services.prefs.clearUserPref(SUGGEST_URLBAR_PREF);
 
     // Disable the notification for future tests so it doesn't interfere with
     // them.  clearUserPref() won't work because by default the pref is false.
     Services.prefs.setBoolPref(CHOICE_PREF, true);