diff options
Diffstat (limited to 'dom/quota/test/xpcshell/test_clearStoragesForPrivateBrowsing.js')
-rw-r--r-- | dom/quota/test/xpcshell/test_clearStoragesForPrivateBrowsing.js | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/dom/quota/test/xpcshell/test_clearStoragesForPrivateBrowsing.js b/dom/quota/test/xpcshell/test_clearStoragesForPrivateBrowsing.js new file mode 100644 index 0000000000..6a94e5c98e --- /dev/null +++ b/dom/quota/test/xpcshell/test_clearStoragesForPrivateBrowsing.js @@ -0,0 +1,41 @@ +/** + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ + */ + +/** + * This test is mainly to verify clearing of storages for private browsing. + */ + +async function testSteps() { + const packages = [ + "clearStoragesForPrivateBrowsing_profile", + "defaultStorageDirectory_shared", + ]; + + info("Clearing"); + + let request = clear(); + await requestFinished(request); + + info("Verifying storage"); + + verifyStorage(packages, "beforeInstall"); + + info("Installing package"); + + installPackages(packages); + + info("Verifying storage"); + + verifyStorage(packages, "afterInstall"); + + info("Clearing private browsing"); + + request = clearPrivateBrowsing(); + await requestFinished(request); + + info("Verifying storage"); + + verifyStorage(packages, "afterClearPrivateBrowsing"); +} |