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

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: modifying as per review comments 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
« no previous file with comments | « no previous file | LayoutTests/editing/deleting/maintain-style-after-delete-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b984f4eb645469063b0af8ae8895de1b42ae2d45
--- /dev/null
+++ b/LayoutTests/editing/deleting/maintain-style-after-delete.html
@@ -0,0 +1,35 @@
+<!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>
+</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, "Deleting 'W' in blue color and then inserting 'O'. The following markup should show 'O' in blue color.");
+
+selection.collapse(testElement, 1);
+document.execCommand("InsertText", false, "W");
+Markup.dump(test, "Inserting 'W' at the intersection of the two text nodes. The following markup should show that 'W' is not added in blue color.");
+
+selection.collapse(testElement, 2);
+document.execCommand("Delete");
+document.execCommand("Delete");
+document.execCommand("Delete");
+document.execCommand("InsertText", false, "W");
+Markup.dump(test, "Deleting the blue colored text and the preceding space and then inserting 'W'. 'W' should not be in blue color in the following markup.");
+
+Markup.notifyDone();
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/editing/deleting/maintain-style-after-delete-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698