<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
selection_test(
[
'<div contenteditable>',
'<div>this line</div>',
'this <span style="display: inline-block;">i|s</span> broken',
'</div>',
],
selection => selection.modify('move', 'backward', 'line'),
[
'<div contenteditable>',
'<div>this l|ine</div>',
'this <span style="display: inline-block;">is</span> broken',
'</div>',
]);
selection_test(
[
'<div contenteditable>',
'this <span style="display: inline-block;">i|s</span> broken',
'<div>this line</div>',
'</div>',
],
selection => selection.modify('move', 'forward', 'line'),
[
'<div contenteditable>',
'this <span style="display: inline-block;">is</span> broken',
'<div>this l|ine</div>',
'</div>',
]);
</script>