| 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> |
| 1 <script> | 5 <script> |
| 2 if (window.testRunner) | 6 test(() => assert_selection( |
| 3 testRunner.dumpEditingCallbacks(); | 7 '<div contenteditable id="div"><img src="../resources/abe.png"><br>foo</div>
', |
| 8 selection => { |
| 9 // Select the line break |
| 10 var e = selection.document.getElementById("div"); |
| 11 selection.setBaseAndExtent(e, 1, e, 2); |
| 12 }, |
| 13 '<div contenteditable id="div"><img src="../resources/abe.png">^<br>|foo</di
v>'), |
| 14 'Only the line break after the image should be selected.'); |
| 4 </script> | 15 </script> |
| 5 <p>Only the line break after the image should be selected.</p> | |
| 6 <hr> | |
| 7 <div contenteditable="true" id="div"><img src="../resources/abe.png"><br>foo</di
v> | |
| 8 | |
| 9 <script> | |
| 10 if (window.testRunner) | |
| 11 window.testRunner.dumpSelectionRect(); | |
| 12 | |
| 13 var e = document.getElementById("div"); | |
| 14 var s = window.getSelection(); | |
| 15 // Select the line break | |
| 16 s.setBaseAndExtent(e, 1, e, 2); | |
| 17 </script> | |
| OLD | NEW |