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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <script src="../assert_selection.js"></script>
5 <script>
6 test(() => {
7 assert_not_equals(
8 window.testRunner, undefined,
9 'This test requires testRunner.');
10
11 assert_selection(
12 [
13 '<div contenteditable>^foo bar baz.|</div>',
14 '<div contenteditable id="paste"><br></div>'
15 ].join(''),
16 selection => {
17 const document = selection.document;
18 document.execCommand('underline');
19 document.execCommand('copy');
20 document.getElementById('paste').focus();
21 document.execCommand('paste');
22 },
23 [
24 '<div contenteditable><u>foo bar baz.</u></div>',
25 '<div contenteditable id="paste"><u>foo bar baz.|</u></div>'
26 ].join(''));
27 }, 'Copy/paste underlined text.');
28 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698