tor-browser

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

window-domain-success.sub.html (1023B)


      1 <!DOCTYPE html>
      2 <!-- Based on similar tests in html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/ -->
      3 <meta charset="utf-8">
      4 <title>Structured cloning of WebAssembly.Module into same-origin-domain windows</title>
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <script src="./resources/test-incrementer.js"></script>
      8 
      9 <div id="log"></div>
     10 
     11 <script>
     12 "use strict";
     13 document.domain = "{{host}}";
     14 
     15 promise_test(t => {
     16  return new Promise(resolve => {
     17    const iframe = document.createElement("iframe");
     18    iframe.onload = t.step_func(() => {
     19      resolve(testSharingViaIncrementerScript(t, window, "window", iframe.contentWindow, "iframe", "*"));
     20    });
     21    iframe.src = "//{{domains[www1]}}:{{location[port]}}/wasm/serialization/module/resources/incrementer-iframe-domain.sub.html";
     22    document.body.appendChild(iframe);
     23  });
     24 }, "postMessaging to a same-origin-domain (but not same-origin) iframe allows them to instantiate");
     25 
     26 </script>