Bug 1219754 - Increase the minimum number of local matches in the awesomebar (bug 1219754); rs=mak, a=lizzard
authorPanos Astithas <past@mozilla.com>
Fri, 13 Nov 2015 18:26:05 +0200
changeset 298594 20bb450629ed37861b84d7c9aef2f29476556bb3
parent 298593 5ddc4e2c8cde972f5eac627d18cba2e9b8b5fd1f
child 298595 4be77f63b5dafbc1baace728eb0e2e60d66364e5
push id964
push usercbook@mozilla.com
push dateTue, 08 Dec 2015 11:32:54 +0000
treeherdermozilla-release@fbd57ae0485f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak, lizzard
bugs1219754
milestone43.0
Bug 1219754 - Increase the minimum number of local matches in the awesomebar (bug 1219754); rs=mak, a=lizzard
toolkit/components/places/UnifiedComplete.js
toolkit/components/places/tests/unifiedcomplete/test_searchSuggestions.js
--- a/toolkit/components/places/UnifiedComplete.js
+++ b/toolkit/components/places/UnifiedComplete.js
@@ -66,17 +66,17 @@ const TITLE_SEARCH_ENGINE_SEPARATOR = " 
 const TELEMETRY_1ST_RESULT = "PLACES_AUTOCOMPLETE_1ST_RESULT_TIME_MS";
 const TELEMETRY_6_FIRST_RESULTS = "PLACES_AUTOCOMPLETE_6_FIRST_RESULTS_TIME_MS";
 // The default frecency value used when inserting matches with unknown frecency.
 const FRECENCY_DEFAULT = 1000;
 
 // Remote matches are appended when local matches are below a given frecency
 // threshold (FRECENCY_DEFAULT) as soon as they arrive.  However we'll
 // always try to have at least MINIMUM_LOCAL_MATCHES local matches.
-const MINIMUM_LOCAL_MATCHES = 5;
+const MINIMUM_LOCAL_MATCHES = 6;
 
 // A regex that matches "single word" hostnames for whitelisting purposes.
 // The hostname will already have been checked for general validity, so we
 // don't need to be exhaustive here, so allow dashes anywhere.
 const REGEXP_SINGLEWORD_HOST = new RegExp("^[a-z0-9-]+$", "i");
 
 // Regex used to match one or more whitespace.
 const REGEXP_SPACES = /\s+/;
--- a/toolkit/components/places/tests/unifiedcomplete/test_searchSuggestions.js
+++ b/toolkit/components/places/tests/unifiedcomplete/test_searchSuggestions.js
@@ -374,16 +374,18 @@ add_task(function* mixup_frecency() {
       { uri: NetUtil.newURI("http://example.com/hi1"),
         title: "high frecency 1",
         style: [ "bookmark" ] },
       { uri: NetUtil.newURI("http://example.com/hi0"),
         title: "high frecency 0",
         style: [ "bookmark" ] },
       { uri: NetUtil.newURI("http://example.com/lo4"),
         title: "low frecency 4" },
+      { uri: NetUtil.newURI("http://example.com/lo3"),
+        title: "low frecency 3" },
       {
         uri: makeActionURI(("searchengine"), {
           engineName: ENGINE_NAME,
           input: "frecency foo",
           searchQuery: "frecency",
           searchSuggestion: "frecency foo",
         }),
         title: ENGINE_NAME,
@@ -396,18 +398,16 @@ add_task(function* mixup_frecency() {
           input: "frecency bar",
           searchQuery: "frecency",
           searchSuggestion: "frecency bar",
         }),
         title: ENGINE_NAME,
         style: ["action", "searchengine"],
         icon: "",
       },
-      { uri: NetUtil.newURI("http://example.com/lo3"),
-        title: "low frecency 3" },
       { uri: NetUtil.newURI("http://example.com/lo2"),
         title: "low frecency 2" },
       { uri: NetUtil.newURI("http://example.com/lo1"),
         title: "low frecency 1" },
       { uri: NetUtil.newURI("http://example.com/lo0"),
         title: "low frecency 0" },
     ],
   });