Bug 1466548 - Fix test_adaptive_limited.js when maxRichResults is not set. r=adw
MozReview-Commit-ID: 7F0Arzt0vhU
--- 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,
});