Backed out changeset 06f41c22f3a6 (bug 1888460) for causing linux xpcshell failures...
[gecko.git] / dom / workers / test / test_rvals.html
blob799c42779d1143b2b9f0ba6927cda6adc3c22bf8
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">
15 var worker = new Worker("rvals_worker.js");
17 worker.onmessage = function(event) {
18 if (event.data == 'ignore') return;
20 if (event.data == 'finished') {
21 is(worker.terminate(), undefined, "Terminate() returns 'undefined'");
22 SimpleTest.finish();
23 return;
26 ok(event.data, "something good returns 'undefined' in workers");
29 is(worker.postMessage(42), undefined, "PostMessage() returns 'undefined' on main thread");
30 SimpleTest.waitForExplicitFinish();
32 </script>
33 </pre>
34 </body>
35 </html>