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

Unified Diff: third_party/WebKit/LayoutTests/editing/pasteboard/copy-paste-underlined.html

Issue 2621213002: Convert editing/pasteboard/5075944.html with assert_selection (Closed)
Patch Set: Add availability check of test runner Created 3 years, 11 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/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>

Powered by Google App Engine
This is Rietveld 408576698