sending-messages.html (434B)
1 <!doctype html> 2 <title>close() and sending messages</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <div id="log"></div> 6 <script> 7 async_test(function() { 8 var worker = new Worker('sending-messages.js'); 9 var i = 0; 10 worker.onmessage = this.step_func(function(e) { 11 i++; 12 assert_equals(e.data, i); 13 if (i == 2) { 14 this.done(); 15 } 16 }); 17 }); 18 </script>