Index: LayoutTests/editing/selection/deleteFromDocument-undo-crash.html |
diff --git a/LayoutTests/editing/selection/deleteFromDocument-undo-crash.html b/LayoutTests/editing/selection/deleteFromDocument-undo-crash.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..88638f681224a4219ed45b81dab546894d61a285 |
--- /dev/null |
+++ b/LayoutTests/editing/selection/deleteFromDocument-undo-crash.html |
@@ -0,0 +1,30 @@ |
+<html> |
+<head> |
+<script id="script1"></script> |
+<script> |
+if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ |
+window.onload = function () { |
+ document.designMode = "on"; |
+ var selection = window.getSelection(); |
+ document.execCommand("SelectAll", false) |
+ var range = selection.getRangeAt(0); |
+ |
+ range.insertNode(document.getElementById("script1")); |
+ document.execCommand('InsertText', false, 'efgh'); |
+ document.execCommand('JustifyFull', false, false); |
+ |
+ selection.deleteFromDocument(); |
+ document.execCommand("Undo", false, false); |
+ |
+ document.execCommand("Delete"); |
+ |
+ document.documentElement.innerHTML = "PASS. Blink didn't crash."; |
+}; |
+</script> |
+</head> |
+<body> |
+ <h1>abcd</h1> |
+</body> |
+</html> |