Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / node-iterator-document-moved-crash.html
blob07e370d88a248239a80b8072c86f21d96e771f65
1 <html>
2 <head>
3 <script>
4 if (window.testRunner) {
5 testRunner.dumpAsText();
6 testRunner.waitUntilDone();
9 function gc()
11 if (window.GCController)
12 return GCController.collect();
14 for (var i = 0; i < 10000; i++) { // force garbage collection (FF requires about 9K allocations before a collect).
15 var s = new String("abc");
19 function runTest()
21 aElement = document.createElement('a');
22 divElement = document.createElement('div');
23 document.body.appendChild(divElement);
24 nodeIterator = win.document.createNodeIterator(aElement);
25 win.document.body.appendChild(aElement);
27 delete nodeIterator;
28 gc();
29 document.body.removeChild(divElement);
30 gc();
32 if (window.testRunner)
33 testRunner.notifyDone();
35 </script>
36 </head>
37 <body>
38 <iframe onload="this.onload = null; win = this.contentWindow; runTest();"></iframe>
39 Test passes if it does not crash.
40 </body>
41 </html>