Index: LayoutTests/editing/execCommand/editing-nontext-node-crash.xhtml |
=================================================================== |
--- LayoutTests/editing/execCommand/editing-nontext-node-crash.xhtml (revision 0) |
+++ LayoutTests/editing/execCommand/editing-nontext-node-crash.xhtml (revision 55442) |
@@ -0,0 +1,36 @@ |
+<html xmlns="http://www.w3.org/1999/xhtml"> |
+ <head> |
+ <script>//<![CDATA[ |
+ if (window.layoutTestController) |
+ layoutTestController.dumpAsText(); |
+ |
+ var selection = window.getSelection(); |
+ function runEditingTest() { |
+ var elem = document.getElementById("test2"); |
+ selection.setPosition(elem, 0); |
+ for (i = 0; i < 21; i++) |
+ selection.modify("move", "forward", "character"); |
+ document.execCommand("Delete"); |
+ |
+ // Test completed without crash. |
+ document.getElementById("test1").removeChild(elem); |
+ document.getElementById("result").innerHTML = "PASS"; |
+ } |
+ //]]></script> |
+ </head> |
+ <body onload="runEditingTest()"> |
+ <p>This tests passes if it does not crash.</p> |
+ <div id="result"></div> |
+ <div id="test1" contenteditable=""> |
+ <span id="test2">Something Something <br/> |
+ <svg xmlns="http://www.w3.org/2000/svg"> |
+ <html xmlns="http://www.w3.org/1999/xhtml"> |
+ <body> |
+ </body> |
+ </html> |
+ </svg> |
+ </span> |
+ </div> |
+ </body> |
+</html> |
+ |