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

Unified Diff: LayoutTests/editing/deleting/maintain-style-after-delete.html

Issue 23950006: Patch for proper re-setting of frame selection's typing style. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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/deleting/maintain-style-after-delete.html
diff --git a/LayoutTests/editing/deleting/maintain-style-after-delete.html b/LayoutTests/editing/deleting/maintain-style-after-delete.html
new file mode 100644
index 0000000000000000000000000000000000000000..a99d76af0f909436a616262d017019c06f2c1cd3
--- /dev/null
+++ b/LayoutTests/editing/deleting/maintain-style-after-delete.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../../resources/dump-as-markup.js"></script>
+<div contenteditable="true">
+<div id="test">H <span style="color: blue;">W</span></div>
yosin_UTC9 2013/09/06 08:10:16 Please add test case for multiple text nodes. tes
arpitab_ 2013/09/06 14:01:32 Have added another test scenario (the second one)
+</div>
+<script>
+Markup.description('Testcase for bug http://crbug.com/286219: When deleting editable content, typing style should be reset when moving into another node.');
+
+Markup.waitUntilDone();
+
+var testElement = document.getElementById('test');
+var selection = window.getSelection();
+
+selection.collapse(testElement, 2);
+document.execCommand("Delete");
+document.execCommand("InsertText", false, "O");
+Markup.dump(test);
+
+document.execCommand("Delete");
+document.execCommand("Delete");
+document.execCommand("InsertText", false, "W");
+Markup.dump(test);
+
+Markup.notifyDone();
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698