Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / message-port-no-wrapper.html
blob3ec81155de84f69e97d9a9f8af9ac2c51fbfbaa3
1 <body>
2 <p>Test that delivering a message to a port that was never referenced from JS doesn't cause a crash.</p>
3 <pre id=log></pre>
5 <script>
6 function gc()
8 if (window.GCController)
9 return GCController.collect();
11 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
12 var s = new String("abc");
16 function log(message)
18 document.getElementById("log").innerHTML += message + "<br>";
21 if (window.testRunner) {
22 testRunner.dumpAsText();
23 testRunner.waitUntilDone();
26 var channel = new MessageChannel;
27 channel.port1.postMessage("msg");
28 channel.port1.start();
29 channel = 0;
30 gc();
32 setTimeout("log('PASS'); if (window.testRunner) testRunner.notifyDone()", 100);
34 </script>
35 </body>