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 <div id="log"></div> |
| 6 <script> |
| 7 test(() => assert_selection( |
| 8 '<div contenteditable>|</div>', |
| 9 selection => { |
| 10 selection.document.execCommand('insertText', false, 'foo'); |
| 11 selection.document.execCommand('undo'); |
| 12 selection.document.execCommand('redo'); |
| 13 }, |
| 14 '<div contenteditable>foo|</div>'), |
| 15 'Redo insertText on empty editable'); |
| 16 |
| 17 test(() => assert_selection( |
| 18 '<div contenteditable>fo|o</div>', |
| 19 selection => { |
| 20 selection.document.execCommand('insertText', false, 'bar'); |
| 21 selection.document.execCommand('undo'); |
| 22 selection.document.execCommand('redo'); |
| 23 }, |
| 24 '<div contenteditable>fobar|o</div>'), |
| 25 'Redo insertText on non-empty editable'); |
| 26 </script> |
OLD | NEW |