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

Unified Diff: third_party/WebKit/LayoutTests/editing/style/typing_style.html

Issue 2251643004: Convert editing/style/style-3681552-fix-002.html to use w3c test harness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-08-17T15:30:11 Created 4 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: 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>',

Powered by Google App Engine
This is Rietveld 408576698