Index: LayoutTests/editing/deleting/merge-div-with-inline-style.html |
diff --git a/LayoutTests/editing/deleting/merge-div-with-inline-style.html b/LayoutTests/editing/deleting/merge-div-with-inline-style.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..29eecd43ec323b27ab4c6bdd144288f0ce6a02aa |
--- /dev/null |
+++ b/LayoutTests/editing/deleting/merge-div-with-inline-style.html |
@@ -0,0 +1,28 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<style type="text/css"> |
+.styleToMerge { |
+color: red; |
+font-size: 10px; |
+} |
+</style> |
+</head> |
+<body> |
+<div id="test" contenteditable="true"> |
+<div>foo</div> |
+<div id="divToMerge" class="styleToMerge" style="color:green;font-size:20px">bar</div> |
+</div> |
+<script src="../../resources/dump-as-markup.js"></script> |
+<script> |
+Markup.description('The inline style should be applied when merging div element.\n' |
+ + 'The test passes if "bar" has the green color and 20px font-size.'); |
+ |
+var divToMerge = document.getElementById("divToMerge"); |
+divToMerge.focus(); |
+getSelection().collapse(divToMerge, 0); |
+document.execCommand("Delete"); |
+Markup.dump(document.getElementById("test")); |
+</script> |
+</body> |
+</html> |