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 |
new file mode 100644 |
index 0000000000000000000000000000000000000000..38aea5bc3e79c5c248b4be650e70add607ef9abb |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/editing/pasteboard/copy-paste-underlined.html |
@@ -0,0 +1,28 @@ |
+<!doctype html> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script src="../assert_selection.js"></script> |
+<script> |
+test(() => { |
+ assert_not_equals( |
+ window.testRunner, undefined, |
+ 'This test requires testRunner.'); |
+ |
+ assert_selection( |
+ [ |
+ '<div contenteditable>^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><u>foo bar baz.</u></div>', |
+ '<div contenteditable id="paste"><u>foo bar baz.|</u></div>' |
+ ].join('')); |
+ }, 'Copy/paste underlined text.'); |
+</script> |