Index: third_party/WebKit/LayoutTests/editing/pasteboard/copy-paste-underlined.html |
diff --git a/third_party/WebKit/LayoutTests/editing/pasteboard/copy-paste-underlined.html b/third_party/WebKit/LayoutTests/editing/pasteboard/copy-paste-underlined.html |
index 38aea5bc3e79c5c248b4be650e70add607ef9abb..704b7aff52926d3f9f8b4987ec0aba1361423650 100644 |
--- a/third_party/WebKit/LayoutTests/editing/pasteboard/copy-paste-underlined.html |
+++ b/third_party/WebKit/LayoutTests/editing/pasteboard/copy-paste-underlined.html |
@@ -25,4 +25,27 @@ test(() => { |
'<div contenteditable id="paste"><u>foo bar baz.|</u></div>' |
].join('')); |
}, 'Copy/paste underlined text.'); |
+ |
+test(() => { |
+ assert_not_equals( |
+ window.testRunner, undefined, |
+ 'This test requires testRunner.'); |
+ |
+ assert_selection( |
+ [ |
+ '<div contenteditable spellcheck="false">^foo bar baz.|</div>', |
+ '<div contenteditable id="paste"><br></div>' |
+ ].join(''), |
+ selection => { |
+ const document = selection.document; |
+ document.execCommand('underline'); |
+ document.execCommand('copy'); |
+ document.getElementById('paste').focus(); |
+ document.execCommand('paste'); |
+ }, |
+ [ |
+ '<div contenteditable spellcheck="false"><u>foo bar baz.</u></div>', |
+ '<div contenteditable id="paste"><u>foo bar baz.|</u></div>' |
+ ].join('')); |
+ }, 'Copy/paste underlined text with spell checker off.'); |
</script> |