tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_databaseShadowing_clearOriginsByPrefix1.js (747B)


      1 /**
      2 * Any copyright is dedicated to the Public Domain.
      3 * http://creativecommons.org/publicdomain/zero/1.0/
      4 */
      5 
      6 /* import-globals-from databaseShadowing-shared.js */
      7 loadSubscript("databaseShadowing-shared.js");
      8 
      9 add_task(async function testSteps() {
     10  enableNextGenLocalStorage();
     11 
     12  storeData();
     13 
     14  verifyData([]);
     15 
     16  let principal = getPrincipal("http://prefix.test", {});
     17  let request = clearOriginsByPrefix(principal, "default");
     18  await requestFinished(request);
     19 
     20  // Wait for all database connections to close.
     21  request = reset();
     22  await requestFinished(request);
     23 
     24  exportShadowDatabase("shadowdb-clearedOriginsByPrefix.sqlite");
     25 
     26  // The shadow database is now prepared for
     27  // test_databaseShadowing_clearOriginsByPrefix2.js
     28 });