test_rvals.html (907B)
1 <!-- 2 Any copyright is dedicated to the Public Domain. 3 http://creativecommons.org/publicdomain/zero/1.0/ 4 --> 5 <!DOCTYPE HTML> 6 <html> 7 <head> 8 <title>Test for bug 911085</title> 9 <script src="/tests/SimpleTest/SimpleTest.js"></script> 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 11 </head> 12 <body> 13 <script class="testbody" type="text/javascript"> 14 15 var worker = new Worker("rvals_worker.js"); 16 17 worker.onmessage = function(event) { 18 if (event.data == 'ignore') return; 19 20 if (event.data == 'finished') { 21 is(worker.terminate(), undefined, "Terminate() returns 'undefined'"); 22 SimpleTest.finish(); 23 return; 24 } 25 26 ok(event.data, "something good returns 'undefined' in workers"); 27 }; 28 29 is(worker.postMessage(42), undefined, "PostMessage() returns 'undefined' on main thread"); 30 SimpleTest.waitForExplicitFinish(); 31 32 </script> 33 </pre> 34 </body> 35 </html>