Bug 1406234 - Remove historical search suggestions and move search suggestions on top. r?mak draft
authorPanos Astithas <past@mozilla.com>
Fri, 13 Oct 2017 17:13:25 +0300
changeset 680819 e40020617ec90af3cdbd05b3ff34060baddf27ce
parent 680726 89ab122de8a0a3057e2f91fa65d9e1e446e87ddc
child 735981 847d1981c20f341b9f8b2e883212e92d543ade46
push id84642
push userbmo:past@mozilla.com
push dateMon, 16 Oct 2017 12:38:05 +0000
reviewersmak
bugs1406234
milestone58.0a1
Bug 1406234 - Remove historical search suggestions and move search suggestions on top. r?mak MozReview-Commit-ID: 9SbHU63amlN
browser/app/profile/firefox.js
browser/modules/test/browser/browser_UsageTelemetry_urlbar.js
--- 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();