postMessage_block.https.html (480B)
1 <!DOCTYPE html> 2 <meta charset=utf-8> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <body> 6 <script> 7 const t = async_test('postMessage and block'); 8 9 const w = new Worker('support/postMessage_block_worker.js'); 10 11 w.onmessage = t.step_func_done(() => { 12 const a = new Int32Array(new SharedArrayBuffer(4)); 13 w.postMessage(a); 14 while (Atomics.load(a, 0) === 0); 15 assert_equals(Atomics.load(a, 0), 1); 16 }); 17 </script> 18 </body>