Backed out changeset 06f41c22f3a6 (bug 1888460) for causing linux xpcshell failures...
[gecko.git] / dom / workers / test / test_sharedWorker_lifetime.html
blobb987f0d7cf06057e75b8e057a8f71964b24ab82d
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 MessagePort and SharedWorkers</title>
9 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
10 <script src="/tests/SimpleTest/SimpleTest.js"></script>
11 </head>
12 <body>
13 <script class="testbody" type="text/javascript">
15 var gced = false;
17 var sw = new SharedWorker('sharedWorker_lifetime.js');
18 sw.port.onmessage = function(event) {
19 ok(gced, "The SW is still alive also after GC");
20 SimpleTest.finish();
23 sw = null;
24 SpecialPowers.forceGC();
25 gced = true;
27 SimpleTest.waitForExplicitFinish();
28 </script>
29 </body>
30 </html>