Bug 1466548 - Fix test_adaptive_limited.js when maxRichResults is not set. r=adw
authorMarco Bonardo <mbonardo@mozilla.com>
Mon, 04 Jun 2018 18:04:22 +0200
changeset 421340 b523c89c3497596fab20cda825115daa5b0b7ac4
parent 421339 988847e0ed2ec4f3c87fa3cf92c08eb2a1acd18c
child 421341 1c7d89955364c87b891157ffdde74be8c3ea74cc
push id34091
push userbtara@mozilla.com
push dateTue, 05 Jun 2018 13:52:34 +0000
treeherdermozilla-central@752465b44c79 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersadw
bugs1466548
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1466548 - Fix test_adaptive_limited.js when maxRichResults is not set. r=adw MozReview-Commit-ID: 7F0Arzt0vhU
toolkit/components/places/tests/unifiedcomplete/test_adaptive_limited.js
--- a/toolkit/components/places/tests/unifiedcomplete/test_adaptive_limited.js
+++ b/toolkit/components/places/tests/unifiedcomplete/test_adaptive_limited.js
@@ -24,17 +24,17 @@ add_task(async function() {
 
   registerCleanupFunction(async function() {
     await PlacesUtils.bookmarks.eraseEverything();
     await PlacesUtils.history.clear();
   });
 
   let matches = uris.map(uri => ({ uri: Services.io.newURI(uri),
                                    title: "test visit for " + uri }));
-  let book_index = Math.ceil(Services.prefs.getIntPref("browser.urlbar.maxRichResults") / 4);
+  let book_index = Math.ceil(Services.prefs.getIntPref("browser.urlbar.maxRichResults", 10) / 4);
   matches.splice(book_index, 0, { uri: Services.io.newURI(bm.url.href),
                                   title: "test_book", "style": ["bookmark"] });
 
   await check_autocomplete({
     search: "book",
     matches,
     checkSorting: true,
   });