Index: third_party/WebKit/LayoutTests/editing/style/typing_style.html |
diff --git a/third_party/WebKit/LayoutTests/editing/style/typing_style.html b/third_party/WebKit/LayoutTests/editing/style/typing_style.html |
index e052b9209e67a42e760786d93413040a2d14e8f2..5b020d8d1aa6245f1847a3e0841a2b51994a3af2 100644 |
--- a/third_party/WebKit/LayoutTests/editing/style/typing_style.html |
+++ b/third_party/WebKit/LayoutTests/editing/style/typing_style.html |
@@ -12,7 +12,18 @@ |
selection.document.execCommand('insertText', false, 'x'); |
}, |
'<div contenteditable>here isxxxx|\u{00A0}text</div>'), |
- 'Delete all styled characters then typing character does not keep style'); |
+ 'Delete all styled characters and previous character then typing character does not keep style'); |
+ |
+ test(() => assert_selection( |
+ '<div contenteditable>here is <i>some|</i> text</div>', |
+ selection => { |
+ for (var i = 0; i < 4; ++i) |
+ selection.document.execCommand('delete'); |
+ for (var i = 0; i < 4; ++i) |
+ selection.document.execCommand('insertText', false, 'x'); |
+ }, |
+ '<div contenteditable>here is <i>xxxx|</i>\u{00A0}text</div>'), |
+ 'Delete all styled characters then typing character keeps style'); |
test(() => assert_selection( |
'<div contenteditable>here is <i>some|</i> text</div>', |