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(() => assert_selection( |
| 7 [ |
| 8 '<div contenteditable>', |
| 9 '<div>', |
| 10 '<p>A</p><p>^<br></p><p>B|</p><p><br></p>', |
| 11 '</div>', |
| 12 '</div>', |
| 13 ].join(''), |
| 14 'delete', |
| 15 [ |
| 16 '<div contenteditable>', |
| 17 '<p>A</p><p>|<br></p><p><br></p>', |
| 18 '</div>', |
| 19 ].join('')), |
| 20 'Deleting when a selection starts in a blank line created by a block wit
h a BR placeholder in it and extends to the end of a block.'); |
| 21 |
| 22 test(() => assert_selection( |
| 23 [ |
| 24 '<div contenteditable>', |
| 25 '<div>', |
| 26 '<p>A</p>^<br><p>B|</p><p><br></p>', |
| 27 '</div>', |
| 28 '</div>', |
| 29 ].join(''), |
| 30 'delete', |
| 31 [ |
| 32 '<div contenteditable>', |
| 33 '<p>A</p>|<br><p><br></p>', |
| 34 '</div>', |
| 35 ].join('')), |
| 36 'Deleting when a selection starts in a blank line created by a BR elemen
t and extends to the end of a block.'); |
| 37 |
| 38 test(() => assert_selection( |
| 39 [ |
| 40 '<div contenteditable>', |
| 41 '<div>', |
| 42 '<p>A</p><p>^<br></p><p>B|C</p>', |
| 43 '</div>', |
| 44 '</div>', |
| 45 ].join(''), |
| 46 'delete', |
| 47 [ |
| 48 '<div contenteditable>', |
| 49 '<p>A</p><p>|C</p>', |
| 50 '</div>', |
| 51 ].join('')), |
| 52 'Deleting when a selection starts in a blank line created by a block wit
h a BR placeholder in it and extends to a character that is not at the end of a
block. This ensures that some of our "special-case" code does not run for this c
ase'); |
| 53 |
| 54 test(() => assert_selection( |
| 55 [ |
| 56 '<div contenteditable>', |
| 57 '<div>', |
| 58 '<p>A</p>^<br><p>B|C</p>', |
| 59 '</div>', |
| 60 '</div>', |
| 61 ].join(''), |
| 62 'delete', |
| 63 [ |
| 64 '<div contenteditable>', |
| 65 '<div><p>A</p><p>|C</p></div>', |
| 66 '</div>', |
| 67 ].join('')), |
| 68 'Deleting when a selection starts in a blank line created by a BR elemen
t and extends to a character that is not at the end of a block. This ensures tha
t some of our "special-case" code does not run for this case.'); |
| 69 |
| 70 test(() => assert_selection( |
| 71 [ |
| 72 '<div contenteditable>', |
| 73 '<div>', |
| 74 '<p>A</p>^<br><p>B</p>|<br>', |
| 75 '</div>', |
| 76 '</div>', |
| 77 ].join(''), |
| 78 'delete', |
| 79 [ |
| 80 '<div contenteditable>', |
| 81 '<div>', |
| 82 '<p>A</p>|<br>', |
| 83 '</div>', |
| 84 '</div>', |
| 85 ].join('')), |
| 86 'Deleting when a selection starts in a blank line created by a BR elemen
t and extends to the end of the document.'); |
| 87 </script> |
OLD | NEW |