Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / message-port-constructor-for-deleted-document.html
blob301266a3b212cdeee86a0c3b5bd558d7693ab671
1 <body>
2 <p>Test that destroying a document doesn't cause a crash when executing MessageChannel constructor saved from its Window object.</p>
3 <pre id=log></pre>
4 <script>
5 function gc()
7 if (window.GCController)
8 return GCController.collect();
10 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
11 var s = new String("abc");
15 function log(message)
17 document.getElementById("log").innerHTML += message + "<br>";
20 if (window.testRunner) {
21 testRunner.dumpAsText();
22 testRunner.waitUntilDone();
25 var constructor;
27 function test()
29 constructor = window.frames[0].MessageChannel;
31 var frameElement = document.getElementsByTagName("iframe")[0];
32 frameElement.parentNode.removeChild(frameElement);
33 frameElement = null;
35 gc();
36 setTimeout(test2, 10);
39 function test2()
41 gc();
42 try {
43 new constructor;
44 } catch (ex) {
47 log("Didn't crash: SUCCESS");
49 if (window.testRunner)
50 testRunner.notifyDone();
53 </script>
54 <iframe src="resources/message-port-iframe.html" onload="test()"></iframe>
55 </body>