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

Unified Diff: LayoutTests/editing/style/background-color-retained.html

Issue 19477010: Background color applied on a selection of text is lost when the selection is deleted (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review comments addressed Created 7 years, 2 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/style/background-color-retained-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/editing/style/background-color-retained.html
diff --git a/LayoutTests/editing/style/background-color-retained.html b/LayoutTests/editing/style/background-color-retained.html
new file mode 100644
index 0000000000000000000000000000000000000000..27dcd4e9984beb9cd9404e8a7b14efd097723243
--- /dev/null
+++ b/LayoutTests/editing/style/background-color-retained.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<body>
+<div id="test" contenteditable>
+<span style="background-color:green;">Delete this text and type in new text. Background color should be retained.</span>
+</div>
+<script src="../../resources/dump-as-markup.js"></script>
+<script>
+ Markup.description('Tests whether the background color is retained when all the text is deleted and new text is typed in.');
+
+ var testDiv = document.getElementById("test");
+ testDiv.focus();
+
+ document.execCommand("selectAll");
+ document.execCommand("Delete");
+ document.execCommand("InsertText", false, "New Text");
+
+ Markup.dump(testDiv);
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/editing/style/background-color-retained-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698