Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Unified Diff: LayoutTests/editing/selection/deleteFromDocument-undo-crash.html

Issue 255453003: Let Selection.deleteFromDocument not delete a character when the selection is a caret. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use shouldBeEqualToString instead of shouldBe Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698