| OLD | NEW |
| 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> |
| 1 <script> | 6 <script> |
| 2 if (window.testRunner) | 7 test(() => assert_selection( |
| 3 testRunner.dumpEditingCallbacks(); | 8 '<div contenteditable><div>f^oo</div><div>b|ar</div></div>', |
| 9 'insertParagraph', |
| 10 '<div contenteditable><div>f</div><div>|ar</div></div>'), |
| 11 'Insert a paragraph separator into a selection that spans multiple paragraph
s'); |
| 4 </script> | 12 </script> |
| 5 <p>This tests inserting a paragraph separator into a selection that spans multip
le paragraphs. 'ar' should be on the line after 'f' and the caret should be jus
t before the 'a'.</p> | |
| 6 <div id="test" contenteditable="true"><div>foo</div><div>bar</div></div> | |
| 7 | |
| 8 <script> | |
| 9 var s = window.getSelection(); | |
| 10 var e = document.getElementById("test"); | |
| 11 | |
| 12 s.collapse(e, 0); | |
| 13 s.modify("move", "forward", "character"); | |
| 14 s.modify("extend", "forward", "line"); | |
| 15 | |
| 16 document.execCommand("InsertParagraph"); | |
| 17 | |
| 18 </script> | |
| OLD | NEW |