Use testRunner instead of layoutTestController in fast/doctypes, dom, dynamic, encodi...
[WebKit-https.git] / LayoutTests / fast / dom / remove-body-during-body-replacement.html
1 <!DOCTYPE html>
2 <html>
3 <body><div><script>
4
5 if (!window.testRunner)
6     document.write("This test requires GCController.");
7 else {
8     testRunner.dumpAsText();
9     testRunner.waitUntilDone();
10
11     function crash() {
12         document.open();
13         document.write("PASS. WebKit didn't crash.");
14         document.close();
15         GCController.collect();
16         setTimeout("testRunner.notifyDone()", 0);
17     }
18
19     setTimeout(function () {
20         document.addEventListener('DOMNodeInsertedIntoDocument', function () { crash(); }, true);
21         document.addEventListener('DOMSubtreeModified', function () { /* noop */ }, false);
22         document.body = document.createElement('body');
23     }, 0);
24 }
25
26 </script>
27 </body>
28 </html>