tor-browser

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

storage-access-beyond-cookies.BlobURLDedicatedWorker.sub.https.tentative.window.js (947B)


      1 // META: script=/resources/testdriver.js
      2 // META: script=/resources/testdriver-vendor.js
      3 
      4 'use strict';
      5 
      6 async_test(t => {
      7  // Set up a message listener that simply calls t.done() when a message is received.
      8  window.addEventListener("message", t.step_func(e => {
      9    if (e.data.type != "result") {
     10      return;
     11    }
     12    assert_equals(e.data.message, "Blob URL DedicatedWorker tests completed successfully.");
     13    t.done();
     14  }));
     15 
     16  // Create an iframe that's cross-site with top-frame.
     17  const id = Date.now();
     18  let iframe = document.createElement("iframe");
     19  iframe.src = "https://{{hosts[alt][]}}:{{ports[https][0]}}/storage-access-api/resources/storage-access-beyond-cookies-iframe.sub.html?type=BlobURLDedicatedWorker&id=" + id;
     20  document.body.appendChild(iframe);
     21 
     22 }, "Verify that if the third-party context creates a blob URL using the StorageAccessHandle and sends it to the dedicated worker, the dedicated worker fetch succeeds.");