Bug 1336282 - Moved bookmark frecency query into `PlacesSyncUtils`. r?kitcambridge
MozReview-Commit-ID: IaPspFEk7Ov
--- a/toolkit/components/places/tests/unit/test_sync_utils.js
+++ b/toolkit/components/places/tests/unit/test_sync_utils.js
@@ -169,27 +169,27 @@ var ignoreChangedRoots = Task.async(func
JSON.stringify(changes)}`);
}
yield setChangesSynced(changes);
});
add_task(function* test_fetchURLFrecency() {
// Add visits to the following URLs and then check if frecency for those URLs is not -1.
let arrayOfURLsToVisit = ["https://www.mozilla.org/en-US/", "http://getfirefox.com", "http://getthunderbird.com"];
- for (let url of arrayOfURLsToVisit){
+ for (let url of arrayOfURLsToVisit) {
yield PlacesTestUtils.addVisits(url);
}
- for (let url of arrayOfURLsToVisit){
+ for (let url of arrayOfURLsToVisit) {
let frecency = yield PlacesSyncUtils.history.fetchURLFrecency(url);
equal(typeof frecency, "number");
notEqual(frecency, -1);
}
// Do not add visits to the following URLs, and then check if frecency for those URLs is -1.
let arrayOfURLsNotVisited = ["https://bugzilla.org", "https://example.org"];
- for (let url of arrayOfURLsNotVisited){
+ for (let url of arrayOfURLsNotVisited) {
let frecency = yield PlacesSyncUtils.history.fetchURLFrecency(url);
equal(frecency, -1);
}
});
add_task(function* test_order() {
do_print("Insert some bookmarks");
let guids = yield populateTree(PlacesUtils.bookmarks.menuGuid, {