tor-browser

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

test_storage_manager_persist_allow.js (668B)


      1 /**
      2 * Any copyright is dedicated to the Public Domain.
      3 * http://creativecommons.org/publicdomain/zero/1.0/
      4 */
      5 
      6 function* testSteps() {
      7  SpecialPowers.pushPrefEnv(
      8    {
      9      set: [["dom.storageManager.prompt.testing.allow", true]],
     10    },
     11    continueToNextStep
     12  );
     13  yield undefined;
     14 
     15  navigator.storage.persist().then(grabArgAndContinueHandler);
     16  let persistResult = yield undefined;
     17 
     18  is(persistResult, true, "Persist succeeded");
     19 
     20  navigator.storage.persisted().then(grabArgAndContinueHandler);
     21  let persistedResult = yield undefined;
     22 
     23  is(
     24    persistResult,
     25    persistedResult,
     26    "Persist/persisted results are consistent"
     27  );
     28 
     29  finishTest();
     30 }