tor-browser

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

bless_cross_site_permissions.html (718B)


      1 <!doctype html>
      2 <meta charset="utf-8">
      3 <script src="/resources/testdriver.js"></script>
      4 <script src="/resources/testdriver-vendor.js"></script>
      5 <body>
      6 <script>
      7 // In order to enable `requestStorageAccess` in a third-party context for some
      8 // origin we must first act in a window where that same origin is the top-frame
      9 // due to the following requirements:
     10 // (1) The origin must be `bless`ed when it's in the top-frame
     11 // (2) `set_permission` always operates on the top-frame origin
     12 test_driver.set_test_context(window.opener.top);
     13 test_driver.bless("fake interaction", () => {}, window);
     14 test_driver.set_permission({ name: 'storage-access' }, 'granted');
     15 window.opener.postMessage("blessed", "*");
     16 </script>
     17 </body>