| 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 '<div contenteditable><div>f^oo</div>bar|<br></div>', |
| 8 'insertHTML <div>foo</div><br class="Apple-interchange-newline">', |
| 9 '<div contenteditable><div>ffoo</div><div>|<br></div></div>'), |
| 10 'BR interchange-newline is not inserted'); |
| 11 |
| 12 test(() => assert_selection( |
| 13 [ |
| 14 '<div contenteditable>', |
| 15 '<div style="color:red">b^ar</div>', |
| 16 '<div style="color:blue">baz|<br></div>', |
| 17 '</div>', |
| 18 ].join(''), |
| 19 'insertHTML <div>FOO</div><div>BAR</div>', |
| 20 [ |
| 21 '<div contenteditable>', |
| 22 '<div style="color:red">bFOO</div>', |
| 23 // last BR isn't copied from original DIV. |
| 24 '<div>BAR|</div>', |
| 25 '</div>', |
| 26 ].join('')), |
| 27 'Use existing DIV for partial replacement'); |
| 28 |
| 29 test(() => assert_selection( |
| 30 [ |
| 31 '<div contenteditable>', |
| 32 '<div style="color:red">b^ar</div>', |
| 33 'baz|<br>', |
| 34 '</div>', |
| 35 ].join(''), |
| 36 'insertHTML <div>FOO</div><div>BAR</div>', |
| 37 [ |
| 38 '<div contenteditable>', |
| 39 '<div style="color:red">bFOO</div>', |
| 40 '<div>BAR|</div>', |
| 41 '</div>', |
| 42 ].join('')), |
| 43 'Replace text+BR to DIV'); |
| 44 </script> |
| OLD | NEW |