gecko-dev/browser/components/ssb/tests/xpcshell/test_too_new.js
Dave Townsend 29625e4aba Bug 1602186: Allow installing SSBs and launching them from the command line. r=Gijs
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
2019-12-16 19:49:12 +00:00

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);
});