diff --git a/toolkit/components/places/UnifiedComplete.js b/toolkit/components/places/UnifiedComplete.js index 4dc2001b79fa..e796bfefb083 100644 --- a/toolkit/components/places/UnifiedComplete.js +++ b/toolkit/components/places/UnifiedComplete.js @@ -22,7 +22,6 @@ const PREF_ENABLED = [ "autocomplete.enabled", true ]; const PREF_AUTOFILL = [ "autoFill", true ]; const PREF_AUTOFILL_TYPED = [ "autoFill.typed", true ]; const PREF_AUTOFILL_SEARCHENGINES = [ "autoFill.searchEngines", true ]; -const PREF_RESTYLESEARCHES = [ "restyleSearches", false ]; const PREF_DELAY = [ "delay", 50 ]; const PREF_BEHAVIOR = [ "matchBehavior", MATCH_BOUNDARY_ANYWHERE ]; const PREF_DEFAULT_BEHAVIOR = [ "default.behavior", DEFAULT_BEHAVIOR ]; @@ -372,7 +371,6 @@ XPCOMUtils.defineLazyGetter(this, "Prefs", () => { store.autofill = prefs.get(...PREF_AUTOFILL); store.autofillTyped = prefs.get(...PREF_AUTOFILL_TYPED); store.autofillSearchEngines = prefs.get(...PREF_AUTOFILL_SEARCHENGINES); - store.restyleSearches = prefs.get(...PREF_RESTYLESEARCHES); store.delay = prefs.get(...PREF_DELAY); store.matchBehavior = prefs.get(...PREF_BEHAVIOR); store.filterJavaScript = prefs.get(...PREF_FILTER_JS); @@ -1046,7 +1044,7 @@ Search.prototype = { } // Restyle past searches, unless they are bookmarks or special results. - if (Prefs.restyleSearches && match.style == "favicon") { + if (match.style == "favicon") { this._maybeRestyleSearchMatch(match); } diff --git a/toolkit/components/places/tests/unifiedcomplete/test_searchEngine_restyle.js b/toolkit/components/places/tests/unifiedcomplete/test_searchEngine_restyle.js index 4c2ddcd80ca3..4c3a3824a25c 100644 --- a/toolkit/components/places/tests/unifiedcomplete/test_searchEngine_restyle.js +++ b/toolkit/components/places/tests/unifiedcomplete/test_searchEngine_restyle.js @@ -15,20 +15,11 @@ add_task(function* test_searchEngine() { addBookmark({ uri: uri2, title: "Terms - SearchEngine Search" }); do_log_info("Past search terms should be styled, unless bookmarked"); - Services.prefs.setBoolPref("browser.urlbar.restyleSearches", true); yield check_autocomplete({ search: "term", matches: [ { uri: uri1, title: "Terms", searchEngine: "SearchEngine", style: ["favicon", "search"] }, { uri: uri2, title: "Terms - SearchEngine Search", style: ["bookmark"] } ] }); - do_log_info("Past search terms should not be styled if restyling is disabled"); - Services.prefs.setBoolPref("browser.urlbar.restyleSearches", false); - yield check_autocomplete({ - search: "term", - matches: [ { uri: uri1, title: "Terms - SearchEngine Search" }, - { uri: uri2, title: "Terms - SearchEngine Search", style: ["bookmark"] } ] - }); - yield cleanup(); });