tor-browser

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

shared-storage-writable-img-idl-attribute-included-bytes.tentative.https.sub.html (1654B)


      1 <!doctype html>
      2 <body>
      3  <script src=/resources/testharness.js></script>
      4  <script src=/resources/testharnessreport.js></script>
      5  <script src=/common/utils.js></script>
      6  <script src=/fenced-frame/resources/utils.js></script>
      7  <script src=/shared-storage/resources/util.js></script>
      8  <script src=/shared-storage/resources/util.sub.js></script>
      9  <script>
     10    const sameOrigin = new URL("", location.href).origin;
     11    const crossOrigin = 'https://{{domains[www]}}:{{ports[https][0]}}';
     12 
     13    promise_test(async t => {
     14      await loadSharedStorageImage({
     15        key: ':8J+YgA==:', value: ':4p2k:',
     16        hasSharedStorageWritableAttribute: true,
     17        isSameOrigin: true,
     18      });
     19 
     20      await verifyKeyValueForOrigin(String.fromCharCode(0xD83D, 0xDE00),
     21                                    String.fromCharCode(0x2764),
     22                                    sameOrigin);
     23      await deleteKeyForOrigin(String.fromCharCode(0xD83D, 0xDE00), sameOrigin);
     24    }, 'test <img sharedstoragewritable src=[url]> via JS for same origin img with bytestring');
     25 
     26    promise_test(async t => {
     27      await loadSharedStorageImage({
     28        key: ':8J+MjQ==:', value: ':8J+PgQ==:',
     29        hasSharedStorageWritableAttribute: true,
     30        isSameOrigin: false,
     31      });
     32 
     33      await verifyKeyValueForOrigin(String.fromCharCode(0xD83C, 0xDF0D),
     34                                    String.fromCharCode(0xD83C, 0xDFC1),
     35                                    crossOrigin);
     36      await deleteKeyForOrigin(String.fromCharCode(0xD83C, 0xDF0D), crossOrigin);
     37    }, 'test <img sharedstoragewritable src=[url]> via JS for cross origin img with bytestring');
     38  </script>
     39 </body>