Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / text / split-text-crash.xhtml
1 <html xmlns="http://www.w3.org/1999/xhtml">
2 <body></body>
3 <script>
4 if (window.testRunner) {
5     testRunner.waitUntilDone();
6     testRunner.dumpAsText();
7 }
8
9 function crash() {
10     document.designMode = "on";
11     var textNode = document.body.appendChild(document.createTextNode("PASS. WebKit didn't crash."));
12     var range = document.createRange();
13     range.setStart(textNode, 0);
14     document.addEventListener("DOMNodeInserted", function () {
15         if (textNode)
16             document.body.removeChild(textNode);
17         textNode = null;
18
19         if (window.testRunner) {
20             GCController.collect();
21             setTimeout("testRunner.notifyDone()", 0);
22         }
23     }, true);
24     try {
25         range.insertNode(document.createTextNode(""));
26     } catch(e) { }
27 }
28
29 window.onload = crash;
30 </script>
31 </html>