summaryrefslogtreecommitdiffstats
path: root/toolkit/components/places/tests/migration
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/places/tests/migration')
-rw-r--r--toolkit/components/places/tests/migration/places_v77.sqlite (renamed from toolkit/components/places/tests/migration/places_v75.sqlite)bin1507328 -> 1507328 bytes
-rw-r--r--toolkit/components/places/tests/migration/test_current_from_v74.js26
-rw-r--r--toolkit/components/places/tests/migration/xpcshell.toml2
3 files changed, 26 insertions, 2 deletions
diff --git a/toolkit/components/places/tests/migration/places_v75.sqlite b/toolkit/components/places/tests/migration/places_v77.sqlite
index 2dd624b945..d77d8233b0 100644
--- a/toolkit/components/places/tests/migration/places_v75.sqlite
+++ b/toolkit/components/places/tests/migration/places_v77.sqlite
Binary files differ
diff --git a/toolkit/components/places/tests/migration/test_current_from_v74.js b/toolkit/components/places/tests/migration/test_current_from_v74.js
index 82c535f78f..eeb862daf5 100644
--- a/toolkit/components/places/tests/migration/test_current_from_v74.js
+++ b/toolkit/components/places/tests/migration/test_current_from_v74.js
@@ -4,7 +4,16 @@
"use strict";
add_task(async function setup() {
- await setupPlacesDatabase("places_v74.sqlite");
+ let path = await setupPlacesDatabase("places_v74.sqlite");
+ let db = await Sqlite.openConnection({ path });
+ await db.execute(`
+ INSERT INTO moz_origins (id, prefix, host, frecency, recalc_frecency)
+ VALUES
+ (100, 'https://', 'test1.com', 0, 0),
+ (101, 'https://', 'test2.com', 0, 0),
+ (102, 'https://', 'test3.com', 0, 0)
+ `);
+ await db.close();
});
add_task(async function database_is_valid() {
@@ -20,3 +29,18 @@ add_task(async function database_is_valid() {
await db.execute("SELECT * FROM moz_places_extra");
await db.execute("SELECT * from moz_historyvisits_extra");
});
+
+add_task(async function recalc_origins_frecency() {
+ const db = await PlacesUtils.promiseDBConnection();
+ Assert.equal(await db.getSchemaVersion(), CURRENT_SCHEMA_VERSION);
+
+ Assert.equal(
+ (
+ await db.execute(
+ "SELECT count(*) FROM moz_origins WHERE recalc_frecency = 0"
+ )
+ )[0].getResultByIndex(0),
+ 0,
+ "All entries should be set for recalculation"
+ );
+});
diff --git a/toolkit/components/places/tests/migration/xpcshell.toml b/toolkit/components/places/tests/migration/xpcshell.toml
index b127fa501f..06dbb67fce 100644
--- a/toolkit/components/places/tests/migration/xpcshell.toml
+++ b/toolkit/components/places/tests/migration/xpcshell.toml
@@ -14,7 +14,7 @@ support-files = [
"places_v70.sqlite",
"places_v72.sqlite",
"places_v74.sqlite",
- "places_v75.sqlite",
+ "places_v77.sqlite",
]
["test_current_from_downgraded.js"]