| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <script src="../../resources/testharness.js"></script> | 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> | 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <script src="../assert_selection.js"></script> | 4 <script src="../assert_selection.js"></script> |
| 5 <script> | 5 <script> |
| 6 test(() => assert_selection( | 6 test(() => assert_selection( |
| 7 [ | 7 [ |
| 8 '<div contenteditable style="word-wrap: break-word;">', | 8 '<div contenteditable style="word-wrap: break-word;">', |
| 9 '<div><b>a</b>^b|</div>', | 9 '<div><b>a</b>^b|</div>', |
| 10 '</div>' | 10 '</div>' |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 '<div><div><b>a^</b></div><div>b|</div></div>', | 54 '<div><div><b>a^</b></div><div>b|</div></div>', |
| 55 '</div>' | 55 '</div>' |
| 56 ].join(''), | 56 ].join(''), |
| 57 'bold', | 57 'bold', |
| 58 [ | 58 [ |
| 59 '<div contenteditable style="word-wrap: break-word;">', | 59 '<div contenteditable style="word-wrap: break-word;">', |
| 60 '<div><div><b>a^</b></div><div><b>b|</b></div></div>', | 60 '<div><div><b>a^</b></div><div><b>b|</b></div></div>', |
| 61 '</div>' | 61 '</div>' |
| 62 ].join('')), | 62 ].join('')), |
| 63 'B element should not spread beyond DIV'); | 63 'B element should not spread beyond DIV'); |
| 64 |
| 65 test(() => { |
| 66 assert_not_equals(window.internals, undefined, |
| 67 'This test requires clipboard access'); |
| 68 |
| 69 assert_selection( |
| 70 [ |
| 71 '<div contenteditable>', |
| 72 'one two three<b>\u00A0four|</b>', |
| 73 '</div>' |
| 74 ].join(''), |
| 75 selection => { |
| 76 selection.setClipboardData('one'); |
| 77 selection.document.execCommand('paste'); |
| 78 }, |
| 79 [ |
| 80 '<div contenteditable>', |
| 81 'one two three<b>\u00A0four</b>one|', |
| 82 '</div>' |
| 83 ].join('')); |
| 84 }, 'Pasting at style boundary does not crash or produce empty style span(s)'
); |
| 64 </script> | 85 </script> |
| OLD | NEW |