Bug 1406234 - Remove historical search suggestions and move search suggestions on top. r?mak
MozReview-Commit-ID: 9SbHU63amlN
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -305,17 +305,19 @@ pref("browser.urlbar.filter.javascript",
// the maximum number of results to show in autocomplete when doing richResults
pref("browser.urlbar.maxRichResults", 10);
// The amount of time (ms) to wait after the user has stopped typing
// before starting to perform autocomplete. 50 is the default set in
// autocomplete.xml.
pref("browser.urlbar.delay", 50);
// The maximum number of historical search results to show.
-pref("browser.urlbar.maxHistoricalSearchSuggestions", 1);
+pref("browser.urlbar.maxHistoricalSearchSuggestions", 0);
+// The awesomebar result composition.
+pref("browser.urlbar.matchBuckets", "suggestion:4,general:5");
// The default behavior for the urlbar can be configured to use any combination
// of the match filters with each additional filter adding more results (union).
pref("browser.urlbar.suggest.history", true);
pref("browser.urlbar.suggest.bookmark", true);
pref("browser.urlbar.suggest.openpage", true);
pref("browser.urlbar.suggest.searches", true);
--- a/browser/modules/test/browser/browser_UsageTelemetry_urlbar.js
+++ b/browser/modules/test/browser/browser_UsageTelemetry_urlbar.js
@@ -102,16 +102,19 @@ add_task(async function setup() {
// Clear history so that history added by previous tests doesn't mess up this
// test when it selects results in the urlbar.
await PlacesTestUtils.clearHistory();
// Clear historical search suggestions to avoid interference from previous
// tests.
await SpecialPowers.pushPrefEnv({"set": [["browser.urlbar.maxHistoricalSearchSuggestions", 0]]});
+ // Use the default matching bucket configuration.
+ await SpecialPowers.pushPrefEnv({"set": [["browser.urlbar.matchBuckets", "general:5,suggestion:4"]]});
+
// Make sure to restore the engine once we're done.
registerCleanupFunction(async function() {
Services.telemetry.canRecordExtended = oldCanRecord;
Services.search.currentEngine = originalEngine;
Services.search.removeEngine(engine);
Services.prefs.setBoolPref(SUGGEST_URLBAR_PREF, suggestionsEnabled);
Services.prefs.clearUserPref(ONEOFF_URLBAR_PREF);
await PlacesTestUtils.clearHistory();