OLD | NEW |
(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> |
OLD | NEW |