<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
// Deleting forward seleciton and deleting backward selection yield same
// result.
test(() => assert_selection(
[
'<div contenteditable>',
'<div>foo</div>',
'<div><br></div>',
'<div>^<br></div>',
'<div>x|</div>',
'</div>',
].join(''),
'delete',
[
'<div contenteditable>',
'<div>foo</div>',
'<div><br></div>',
'<div>|<br></div>',
'</div>',
].join('')),
'Delete forward selection');
test(() => assert_selection(
[
'<div contenteditable>',
'<div>foo</div>',
'<div><br></div>',
'<div>|<br></div>',
'<div>x^</div>',
'</div>',
].join(''),
'delete',
[
'<div contenteditable>',
'<div>foo</div>',
'<div><br></div>',
'<div>|<br></div>',
'</div>',
].join('')),
'Delete backward selection');
</script>