| 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 // See detail in http://wkb.ug/8145 |
| 7 test(() => assert_selection( |
| 8 '<div contenteditable="plaintext-only">|</div>', |
| 9 'insertHTML <p style="margin: 0; font: 12px Helvetica">foo <b>bar</b> baz</p
>', |
| 10 '<div contenteditable="plaintext-only">foo bar baz|</div>'), |
| 11 'insert HTML as plain text.'); |
| 12 |
| 13 // Regression by 8145 fix |
| 14 test(() => assert_selection( |
| 15 '<div contenteditable>foo<br>|bar<br>baz</div>', |
| 16 'insertHTML <div>FOO</div>BAR', |
| 17 '<div contenteditable>foo<br><div>FOO</div>BAR|bar<br>baz</div>'), |
| 18 'insert HTML at start of paragraph.'); |
| 19 |
| 20 // Regression by 8145 fix |
| 21 test(() => assert_selection( |
| 22 '<div contenteditable><div>f|oo</div></div>', |
| 23 'insertHTML <div>bar</div>baz<br class="Apple-interchange-newline">', |
| 24 '<div contenteditable><div>fbar</div>baz<div>|oo</div></div>'), |
| 25 'interchange-newline is not inserted before DIV'); |
| 26 </script> |
| OLD | NEW |