Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / editing / execCommand / editing-nontext-node-crash.xhtml
1 <html xmlns="http://www.w3.org/1999/xhtml">
2     <head> 
3         <script>//<![CDATA[
4             if (window.testRunner)
5                 testRunner.dumpAsText();
6
7             var selection = window.getSelection();
8             function runEditingTest() {
9                 var elem = document.getElementById("test2");
10                 selection.collapse(elem, 0);
11                 for (i = 0; i < 21; i++)
12                     selection.modify("move", "forward", "character");
13                 document.execCommand("Delete");
14                 
15                 // Test completed without crash.
16                 document.getElementById("test1").removeChild(elem);
17                 document.getElementById("result").innerHTML = "PASS";
18             }
19         //]]></script>                   
20     </head>  
21     <body onload="runEditingTest()">
22         <p>This tests passes if it does not crash.</p>
23         <div id="result"></div>
24         <div id="test1" contenteditable="">
25             <span id="test2">Something Something <br/>
26                 <svg xmlns="http://www.w3.org/2000/svg">
27                     <html xmlns="http://www.w3.org/1999/xhtml">
28                         <body>
29                         </body>
30                     </html>
31                 </svg>
32             </span>
33         </div>
34     </body>  
35 </html>
36