Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / text-node-append-data-remove-crash.html
blobbbaa082926a6abc1d179151cdcfb1c1de0481627
1 <html>
2 <body onload="runTest()">
3 <script>
4 var count = 0;
5 if (window.testRunner)
7 testRunner.dumpAsText();
8 testRunner.waitUntilDone();
11 function runTest()
13 try {
14 divBlock.addEventListener("DOMCharacterDataModified", eventListener, false);
15 pBlock.outerText = "text";
16 divBlock.innerHTML = "PASS, didn't crash.";
18 catch (exception) {
19 divBlock.innerHTML = "Threw an exception - " + exception;
21 if (window.testRunner)
22 testRunner.notifyDone();
25 function eventListener()
27 try {
28 var range = document.createRange();
29 range.setStart(divBlock, 0);
30 range.setEnd(divBlock, divBlock.childNodes.length - 1);
31 range.deleteContents();
32 gc();
33 } catch(e) { }
36 function gc()
38 if (window.GCController)
39 return GCController.collect();
41 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
42 var s = new String("");
45 </script>
46 <div id="divBlock">
47 <br/>textnode1<p id="pBlock"></p>textnode2<br/>
48 </div>
49 </body>
50 </html>