tor-browser

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

run-operation-in-detached-frame.tentative.https.sub.html (602B)


      1 <!doctype html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 
      5 <body>
      6  <iframe></iframe>
      7  <script>
      8    promise_test(async t => {
      9      const iframe = document.querySelector('iframe');
     10      const childSharedStorage = iframe.contentWindow.sharedStorage;
     11      iframe.remove();
     12 
     13      try {
     14        await childSharedStorage.run("operation1");
     15      } catch (e) {
     16        assert_equals(e.name, 'InvalidAccessError');
     17        return;
     18      }
     19      assert_unreached("did not reject");
     20    }, 'run() when frame is detached');
     21  </script>
     22 </body>