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 288649 f78f4abd2f03c1a781a136528f31dbed7b45bb04
parent 288648 d2da80a77302e0da22d33f440d7fc848b56e15da
child 288650 dc44b9a3b5427f9fd281c49ecbad7af3eb09f0df
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspost-facto-test-only
bugs1192555
milestone42.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 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);