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 [ |
| 9 '<div contenteditable>', |
| 10 'a|<span class="Apple-tab-span" style="white-space:pre">\t\t\t</span
>z', |
| 11 '</div>', |
| 12 ].join(''), |
| 13 selection => { |
| 14 selection.document.execCommand('insertLineBreak'); |
| 15 selection.document.execCommand('insertText', false, 'x'); |
| 16 }, |
| 17 [ |
| 18 '<div contenteditable>', |
| 19 'a<br>x|<span class="Apple-tab-span" style="white-space:pre">\t\t\t<
/span>z', |
| 20 '</div>', |
| 21 ].join('')), |
| 22 'Insert newline and a character before tabspan'); |
| 23 |
| 24 test(() => assert_selection( |
| 25 [ |
| 26 '<div contenteditable>', |
| 27 'a<span class="Apple-tab-span" style="white-space:pre">\t|\t\t</span
>z', |
| 28 '</div>', |
| 29 ].join(''), |
| 30 selection => { |
| 31 selection.document.execCommand('insertLineBreak'); |
| 32 selection.document.execCommand('insertText', false, 'x'); |
| 33 }, |
| 34 [ |
| 35 '<div contenteditable>', |
| 36 'a<span class="Apple-tab-span" style="white-space:pre">\t</span><br>
', |
| 37 'x|<span class="Apple-tab-span" style="white-space:pre">\t\t</span>z
', |
| 38 '</div>', |
| 39 ].join('')), |
| 40 'Insert newline and a character in tabspan'); |
| 41 |
| 42 test(() => assert_selection( |
| 43 [ |
| 44 '<div contenteditable>', |
| 45 'a<span class="Apple-tab-span" style="white-space:pre">\t\t\t|</span
>z', |
| 46 '</div>', |
| 47 ].join(''), |
| 48 selection => { |
| 49 selection.document.execCommand('insertLineBreak'); |
| 50 selection.document.execCommand('insertText', false, 'x'); |
| 51 }, |
| 52 [ |
| 53 '<div contenteditable>', |
| 54 'a<span class="Apple-tab-span" style="white-space:pre">\t\t\t</span>
<br>x|z', |
| 55 '</div>', |
| 56 ].join('')), |
| 57 'Insert newline and a character after tabspan'); |
| 58 </script> |
OLD | NEW |