tor-browser

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

window-messagechannel-success.html (820B)


      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 using MessageChannel</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 
     14 promise_test(t => {
     15  const worker = new Worker("resources/incrementer-worker-with-channel.js");
     16  const channel = new MessageChannel();
     17  worker.postMessage(channel.port2, [channel.port2]);
     18 
     19  return testSharingViaIncrementerScript(t, channel.port1, "window", channel.port1, "worker");
     20 }, "postMessaging to a dedicated worker via MessageChannel allows them to instantiate");
     21 </script>