window-messagechannel-success.https.html (885B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>Structured cloning of SharedArrayBuffers using MessageChannel</title> 4 <link rel="help" href="https://html.spec.whatwg.org/multipage/#structuredserialize"> 5 <link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 <script src="resources/test-incrementer.js"></script> 9 10 <div id="log"></div> 11 12 <script> 13 "use strict"; 14 15 promise_test(t => { 16 const worker = new Worker("resources/incrementer-worker-with-channel.js"); 17 const channel = new MessageChannel(); 18 worker.postMessage(channel.port2, [channel.port2]); 19 20 return testSharingViaIncrementerScript(t, channel.port1, "window", channel.port1, "worker"); 21 }, "postMessaging to a dedicated worker via MessageChannel allows them to see each others' modifications"); 22 </script>