blob: c59fc3ad5cfb5d3882019a81a3fabdfca7868ed8 [file] [log] [blame]
<!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 dir="ltr">|\nabc efd dabeb\n</div>',
selection => selection.modify('extend', 'forward', 'character'),
'<div contenteditable dir="ltr">\n^a|bc efd dabeb\n</div>',
'13-0 ltr forward character');
selection_test(
'<div contenteditable dir="ltr">\n|abc efd dabeb\n</div>',
selection => selection.modify('extend', 'forward', 'character'),
'<div contenteditable dir="ltr">\n^a|bc efd dabeb\n</div>',
'13-1 ltr forward character');
selection_test(
'<div contenteditable dir="ltr">\na|bc efd dabeb\n</div>',
selection => selection.modify('extend', 'forward', 'character'),
'<div contenteditable dir="ltr">\na^b|c efd dabeb\n</div>',
'13-2 ltr forward character');
selection_test(
'<div contenteditable dir="ltr">\nab|c efd dabeb\n</div>',
selection => selection.modify('extend', 'forward', 'character'),
'<div contenteditable dir="ltr">\nab^c| efd dabeb\n</div>',
'13-3 ltr forward character');
selection_test(
'<div contenteditable dir="ltr">\nabc| efd dabeb\n</div>',
selection => selection.modify('extend', 'forward', 'character'),
'<div contenteditable dir="ltr">\nabc^ |efd dabeb\n</div>',
'13-4 ltr forward character');
selection_test(
'<div contenteditable dir="ltr">\nabc |efd dabeb\n</div>',
selection => selection.modify('extend', 'forward', 'character'),
'<div contenteditable dir="ltr">\nabc ^e|fd dabeb\n</div>',
'13-5 ltr forward character');
selection_test(
'<div contenteditable dir="ltr">\nabc e|fd dabeb\n</div>',
selection => selection.modify('extend', 'forward', 'character'),
'<div contenteditable dir="ltr">\nabc e^f|d dabeb\n</div>',
'13-6 ltr forward character');
selection_test(
'<div contenteditable dir="ltr">\nabc ef|d dabeb\n</div>',
selection => selection.modify('extend', 'forward', 'character'),
'<div contenteditable dir="ltr">\nabc ef^d| dabeb\n</div>',
'13-7 ltr forward character');
selection_test(
'<div contenteditable dir="ltr">\nabc efd| dabeb\n</div>',
selection => selection.modify('extend', 'forward', 'character'),
'<div contenteditable dir="ltr">\nabc efd^ |dabeb\n</div>',
'13-8 ltr forward character');
selection_test(
'<div contenteditable dir="ltr">\nabc efd |dabeb\n</div>',
selection => selection.modify('extend', 'forward', 'character'),
'<div contenteditable dir="ltr">\nabc efd ^d|abeb\n</div>',
'13-9 ltr forward character');
selection_test(
'<div contenteditable dir="ltr">\nabc efd d|abeb\n</div>',
selection => selection.modify('extend', 'forward', 'character'),
'<div contenteditable dir="ltr">\nabc efd d^a|beb\n</div>',
'13-10 ltr forward character');
selection_test(
'<div contenteditable dir="ltr">\nabc efd da|beb\n</div>',
selection => selection.modify('extend', 'forward', 'character'),
'<div contenteditable dir="ltr">\nabc efd da^b|eb\n</div>',
'13-11 ltr forward character');
selection_test(
'<div contenteditable dir="ltr">\nabc efd dab|eb\n</div>',
selection => selection.modify('extend', 'forward', 'character'),
'<div contenteditable dir="ltr">\nabc efd dab^e|b\n</div>',
'13-12 ltr forward character');
selection_test(
'<div contenteditable dir="ltr">\nabc efd dabe|b\n</div>',
selection => selection.modify('extend', 'forward', 'character'),
'<div contenteditable dir="ltr">\nabc efd dabe^b|\n</div>',
'13-13 ltr forward character');
selection_test(
'<div contenteditable dir="ltr">\nabc efd dabeb|\n</div>',
selection => selection.modify('extend', 'forward', 'character'),
'<div contenteditable dir="ltr">\nabc efd dabeb|\n</div>',
'13-14 ltr forward character');
</script>