| OLD | NEW |
| 1 <script src="../../resources/testharness.js"></script> | 1 <script src="../../resources/testharness.js"></script> |
| 2 <script src="../../resources/testharnessreport.js"></script> | 2 <script src="../../resources/testharnessreport.js"></script> |
| 3 <script src="../assert_selection.js"></script> | 3 <script src="../assert_selection.js"></script> |
| 4 <div id="log"></div> | 4 <div id="log"></div> |
| 5 <script> | 5 <script> |
| 6 test(() => { | 6 test(() => { |
| 7 assert_selection( | 7 assert_selection( |
| 8 '<div contenteditable>|foo<br><i>bar</i></div>', | 8 '<div contenteditable>|foo<br><i>bar</i></div>', |
| 9 selection => { | 9 selection => { |
| 10 // Make base/extent and start/end different. | 10 // Make base/extent and start/end different. |
| 11 selection.modify('extend', 'forward', 'word'); | 11 selection.modify('extend', 'forward', 'word'); |
| 12 selection.document.execCommand('justifyLeft'); | 12 selection.document.execCommand('justifyLeft'); |
| 13 selection.document.execCommand('undo'); | 13 selection.document.execCommand('undo'); |
| 14 // Remove an anchor node for extent position of redo | 14 // Remove an anchor node for extent position of redo |
| 15 selection.document.querySelector('i').remove(); | 15 selection.document.querySelector('i').remove(); |
| 16 selection.document.execCommand('redo'); | 16 selection.document.execCommand('redo'); |
| 17 }, | 17 }, |
| 18 navigator.platform.indexOf('Mac') == 0 | 18 '<div contenteditable>^foo|<br></div>'); |
| 19 ? '<div contenteditable>^foo|<br></div>' | |
| 20 : '<div contenteditable>^foo<br>|</div>'); | |
| 21 }); | 19 }); |
| 22 </script> | 20 </script> |
| OLD | NEW |