| <!doctype html> | |
| <script src="../../resources/testharness.js"></script> | |
| <script src="../../resources/testharnessreport.js"></script> | |
| <script src="../assert_selection.js"></script> | |
| <script> | |
| test(() => assert_selection( | |
| [ | |
| '<div contenteditable id="one">foo|</div>', | |
| '<div contenteditable id="two">bar</div>', | |
| ].join(''), | |
| selection => { | |
| selection.modify('move', 'forward', 'character'); | |
| selection.document.execCommand('delete'); | |
| }, | |
| [ | |
| '<div contenteditable id="one">fo|</div>', | |
| '<div contenteditable id="two">bar</div>', | |
| ].join('')), | |
| 'Two editing hosts; caret can not cross over editing boundary'); | |
| test(() => assert_selection( | |
| [ | |
| '<div contenteditable>', | |
| '<div contenteditable id="one">foo</div>', | |
| '<div contenteditable id="two">|bar</div>', | |
| '</div>', | |
| ].join(''), | |
| 'delete', | |
| [ | |
| '<div contenteditable>', | |
| '<div contenteditable id="one">foo|bar</div>', | |
| '</div>', | |
| ].join('')), | |
| 'One editing hosts'); | |
| </script> |