tor-browser

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

persist-permission-manual.https.html (959B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <meta charset="utf-8">
      5    <title>StorageManager: permission state is granted</title>
      6    <p>Clear all persistent storage permissions before running this test.</p>
      7    <p>Test passes if there is a permission prompt and click allow store persistent data</p>
      8    <meta name="help" href="https://storage.spec.whatwg.org/#dom-storagemanager-persist">
      9    <meta name="author" title="Mozilla" href="https://www.mozilla.org">
     10    <script src="/resources/testharness.js"></script>
     11    <script src="/resources/testharnessreport.js"></script>
     12  </head>
     13  <body>
     14    <script>
     15    promise_test(function(t) {
     16      return navigator.storage.persist()
     17      .then(function(result) {
     18        assert_true(result);
     19        return navigator.storage.persisted();
     20      })
     21      .then(function(result) {
     22        assert_true(result);
     23      })
     24    }, 'Expect permission state is granted after calling persist()');
     25    </script>
     26  </body>
     27 </html>