Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / NodeList / 5725058-crash-scenario-2.html
blob577ae1355af8cf62d034622438506583bf0c8130
1 <p>Test for (rdar://problem/5725058). If you see this text, then all is well and no crash has occurred.</p>
3 <p id="a">paragraph a</p>
4 <p id="b">paragraph b</p>
5 <script>
6 if (window.testRunner)
7 testRunner.dumpAsText();
9 function triggerGarbageCollection()
11 if (window.GCController) {
12 GCController.collect();
13 return;
15 for (var i = 0; i < 10000; ++i)
16 ({})
19 function setUp()
21 // This only works if in a function. I'm not sure why.
23 // Get node and length from paragraph A into the cache.
24 document.getElementById("a").childNodes[0];
25 document.getElementById("a").childNodes.length;
28 setUp();
30 // Get back to "zero node lists".
31 triggerGarbageCollection();
33 // Remove the child node of paragraph A. Use innerHTML to avoid getting a reference to the node being removed.
34 document.getElementById("a").innerHTML = "";
36 // Get back to "one node list".
37 var childNodesB = document.getElementById("b").childNodes;
39 // Now try the original list.
40 var x = document.getElementById("a").childNodes[0];
41 x = document.getElementById("a").childNodes.length;
42 </script>