chromium/third_party/blink/web_tests/editing/selection/extend/extend_selection_04_ltr_backward_lineboundary.html

<!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">|Lorem <span dir="ltr">ipsum dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsum dolor sit</span> amet</div>',
  '4-0 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">L|orem <span dir="ltr">ipsum dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|L^orem <span dir="ltr">ipsum dolor sit</span> amet</div>',
  '4-1 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lo|rem <span dir="ltr">ipsum dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lo^rem <span dir="ltr">ipsum dolor sit</span> amet</div>',
  '4-2 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lor|em <span dir="ltr">ipsum dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lor^em <span dir="ltr">ipsum dolor sit</span> amet</div>',
  '4-3 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lore|m <span dir="ltr">ipsum dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lore^m <span dir="ltr">ipsum dolor sit</span> amet</div>',
  '4-4 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem| <span dir="ltr">ipsum dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem^ <span dir="ltr">ipsum dolor sit</span> amet</div>',
  '4-5 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">|ipsum dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem ^<span dir="ltr">ipsum dolor sit</span> amet</div>',
  '4-6 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">i|psum dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">i^psum dolor sit</span> amet</div>',
  '4-7 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ip|sum dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ip^sum dolor sit</span> amet</div>',
  '4-8 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ips|um dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ips^um dolor sit</span> amet</div>',
  '4-9 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsu|m dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsu^m dolor sit</span> amet</div>',
  '4-10 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum| dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsum^ dolor sit</span> amet</div>',
  '4-11 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum |dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsum ^dolor sit</span> amet</div>',
  '4-12 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum d|olor sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsum d^olor sit</span> amet</div>',
  '4-13 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum do|lor sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsum do^lor sit</span> amet</div>',
  '4-14 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dol|or sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsum dol^or sit</span> amet</div>',
  '4-15 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolo|r sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsum dolo^r sit</span> amet</div>',
  '4-16 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor| sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsum dolor^ sit</span> amet</div>',
  '4-17 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor |sit</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsum dolor ^sit</span> amet</div>',
  '4-18 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor s|it</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsum dolor s^it</span> amet</div>',
  '4-19 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor si|t</span> amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsum dolor si^t</span> amet</div>',
  '4-20 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span>| amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsum dolor sit^</span> amet</div>',
  '4-21 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span> |amet</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsum dolor sit</span> ^amet</div>',
  '4-22 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span> a|met</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsum dolor sit</span> a^met</div>',
  '4-23 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span> am|et</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsum dolor sit</span> am^et</div>',
  '4-24 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span> ame|t</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsum dolor sit</span> ame^t</div>',
  '4-25 ltr backward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span> amet|</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="ltr">|Lorem <span dir="ltr">ipsum dolor sit</span> amet^</div>',
  '4-26 ltr backward lineboundary');
</script>