blob: 1d995123d96c3489d00544d5d6b98ae7fcf597a4 [file] [log] [blame]
<!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>',
'|<img src="../resources/abe.png">',
'<img src="../resources/abe.png">',
' <img src="../resources/abe.png">',
'</div>',
].join(''),
selection => {
selection.document.execCommand('insertText', false, 'a');
selection.modify('move', 'forward', 'character');
selection.document.execCommand('insertText', false, 'bcd');
selection.modify('move', 'forward', 'character');
selection.document.execCommand('insertText', false, 'efg');
selection.modify('move', 'forward', 'character');
selection.document.execCommand('insertText', false, 'hij');
selection.modify('move', 'forward', 'character');
selection.document.execCommand('insertText', false, 'klm');
},
[
'<div contenteditable>',
'a<img src="../resources/abe.png">',
'bcd<img src="../resources/abe.png">',
'efg\u{00A0}hij<img src="../resources/abe.png">',
'klm|',
'</div>',
].join('')),
'insertText around image');
</script>