Bug 1192555 - browser_urlbarSearchSuggestionsNotification.js should force unifiedComplete. r=post-facto-test-only

This commit is contained in:
Marco Bonardo 2015-08-08 23:39:06 +02:00
parent 7901603bab
commit cbd9532666

View File

@ -5,10 +5,13 @@ 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);