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

Unified Diff: LayoutTests/editing/deleting/merge-paragraph-from-span-with-style.html

Issue 22353004: background-color and text-decoration are not preserved when merging paragraphs (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 7 years, 4 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/merge-paragraph-from-span-with-style.html
diff --git a/LayoutTests/editing/deleting/merge-paragraph-from-span-with-style.html b/LayoutTests/editing/deleting/merge-paragraph-from-span-with-style.html
new file mode 100644
index 0000000000000000000000000000000000000000..64d03f8628a6e306c6a7b53b4c49997a6d2ee27c
--- /dev/null
+++ b/LayoutTests/editing/deleting/merge-paragraph-from-span-with-style.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+.NonInheritableProperties {
+background-color: yellow;
+text-decoration: underline;
+}
+</style>
+</head>
+<body>
+<div id="test" contenteditable="true">
+<p>foo</p>
+<span id="spanToMerge" class="NonInheritableProperties">bar</span>
+</div>
+<script src="../../resources/dump-as-markup.js"></script>
+<script>
+Markup.description('The span style should be preserved when merging a pragraph.\n'
++ 'The test passes if "bar" contatins the yellow background and it\'s underlined.');
+
+var spanToMerge = document.getElementById("spanToMerge");
+spanToMerge.focus();
+getSelection().collapse(spanToMerge, 0);
+document.execCommand("Delete");
+Markup.dump(document.getElementById("test"));
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698