mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-09 12:51:09 +02:00
Allows for persisting SSBs to storage for realoading in a later app instance. Also adds a command line argument to load and open an SSB based on its ID. Differential Revision: https://phabricator.services.mozilla.com/D56289 --HG-- extra : moz-landing-system : lando
22 lines
624 B
JavaScript
22 lines
624 B
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
// A database that is too new should be wiped.
|
|
add_task(async () => {
|
|
let kvstore = await getKVStore();
|
|
kvstore.put(
|
|
"_meta",
|
|
JSON.stringify({
|
|
version: 1000,
|
|
})
|
|
);
|
|
|
|
storeSSB(kvstore, "a", parseManifest("https://www.mozilla.org/"), {});
|
|
storeSSB(kvstore, "b", parseManifest("https://www.microsoft.com/"), {});
|
|
|
|
let ssbs = await SiteSpecificBrowserService.list();
|
|
Assert.equal(ssbs.length, 0);
|
|
|
|
let meta = JSON.parse(await kvstore.get("_meta"));
|
|
Assert.equal(meta.version, 1);
|
|
});
|