tor-browser

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

shared-storage-writable-insecure-context.tentative.http.sub.html (730B)


      1 <!doctype html>
      2 <body>
      3  <script src=/resources/testharness.js></script>
      4  <script src=/resources/testharnessreport.js></script>
      5  <script>
      6    'use strict';
      7 
      8    promise_test(async t => {
      9      try {
     10        new Request('./resources/simple-module.js',
     11                    {sharedStorageWritable: true});
     12      } catch (e) {
     13        assert_equals(e.name, 'TypeError');
     14        assert_equals(e.message, `Failed to construct 'Request': `
     15                      + `sharedStorageWritable: sharedStorage operations `
     16                      + `are only available in secure contexts.`);
     17        return;
     18      }
     19      assert_unreached("did not reject");
     20    }, 'sharedStorageWritable not allowed in insecure context.');
     21  </script>
     22 </body>