Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / NodeList / childNodes-reset-cache.html
blob929a4a1f3a350d73f02e3aa26189f396ddea087a
1 <html>
2 <body>
3 <p>Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=13514">bug 13514</a>:
4 REGRESSION (r20997-21003): Crash in WebCore::Node::Document.</p>
5 <div id="elem"><p></p></div>
7 <script>
8 if (window.testRunner)
9 testRunner.dumpAsText();
11 function gc()
13 if (window.GCController)
14 return GCController.collect();
16 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
17 var s = new String("");
21 elem = document.getElementById('elem');
23 elem.childNodes.length;
24 elem.childNodes[0].length;
25 gc();
26 elem.innerHTML = "";
27 gc();
28 elem.childNodes[0];
29 if (elem.childNodes.length == 0)
30 document.write("SUCCESS");
31 else
32 document.write("FAILURE: childNodes.length was cached inappropriately");
34 </script>
35 </body>
36 </html>