Index: third_party/WebKit/LayoutTests/editing/deleting/merge_paragraph_from_p_with_style.html |
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/merge_paragraph_from_p_with_style.html b/third_party/WebKit/LayoutTests/editing/deleting/merge_paragraph_from_p_with_style.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9f8b7ba4b2c33d0d23ed59005a2e135ad3162c96 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/editing/deleting/merge_paragraph_from_p_with_style.html |
@@ -0,0 +1,63 @@ |
+<!doctype html> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script src="../assert_selection.js"></script> |
+<script> |
+test(() =>assert_selection( |
+ [ |
+ '<div contenteditable>', |
+ 'foo<p style="font-style: italic;">|bar</p>', |
+ '</div>', |
+ ].join(''), |
+ 'delete', |
+ [ |
+ '<div contenteditable>', |
+ 'foo|<span style="font-style: italic;">bar</span>', |
+ '</div>', |
+ ].join('')), |
+ '1 deleting line break before P with style'); |
+ |
+test(() =>assert_selection( |
+ [ |
+ '<style>div p { color: red }</style>', |
+ '<div contenteditable style="color: red;">', |
+ '<h1>foo</h1><p><i>|bar</i></p>', |
+ '</div>', |
+ ].join(''), |
+ 'delete', |
+ [ |
+ '<style>div p { color: red }</style>', |
+ '<div contenteditable style="color: red;">', |
+ '<h1>foo|<i>bar</i></h1>', |
+ '</div>', |
+ ].join('')), |
+ '2-1 deleting line break before P+I+style'); |
+ |
+test(() =>assert_selection( |
+ [ |
+ '<div contenteditable>', |
+ '<h1>foo</h1><p><i>|bar</i></p>', |
+ '</div>', |
+ ].join(''), |
+ 'delete', |
+ [ |
+ '<div contenteditable>', |
+ '<h1>foo|<i>bar</i></h1>', |
+ '</div>', |
+ ].join('')), |
+ '2-2 deleting line break before P+I'); |
+ |
+test(() =>assert_selection( |
+ [ |
+ '<div contenteditable style="color: red;">', |
+ '<h1>foo</h1><p><font color="red"><span style="color: green;">|bar</span></p>', |
+ '</div>', |
+ ].join(''), |
+ 'delete', |
+ [ |
+ '<div contenteditable style="color: red;">', |
+ '<h1>foo|bar</h1>', |
+ '</div>', |
+ ].join('')), |
+ '3 deleting line break before P+FONT+style'); |
+</script> |