chromium/third_party/blink/web_tests/editing/selection/extend/extend_selection_01_ltr_forward_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 style="direction: rtl">ipsum dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">^Lorem <span style="direction: rtl">ipsum dolor sit</span> amet|</div>',
  '1-0 ltr forward lineboundary');

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

selection_test(
  '<div contenteditable dir="ltr">Lo|rem <span style="direction: rtl">ipsum dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lo^rem <span style="direction: rtl">ipsum dolor sit</span> amet|</div>',
  '1-2 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lor|em <span style="direction: rtl">ipsum dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lor^em <span style="direction: rtl">ipsum dolor sit</span> amet|</div>',
  '1-3 ltr forward lineboundary');

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

selection_test(
  '<div contenteditable dir="ltr">Lorem| <span style="direction: rtl">ipsum dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem^ <span style="direction: rtl">ipsum dolor sit</span> amet|</div>',
  '1-5 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">|ipsum dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">^ipsum dolor sit</span> amet|</div>',
  '1-6 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">i|psum dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">i^psum dolor sit</span> amet|</div>',
  '1-7 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ip|sum dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ip^sum dolor sit</span> amet|</div>',
  '1-8 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ips|um dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ips^um dolor sit</span> amet|</div>',
  '1-9 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsu|m dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsu^m dolor sit</span> amet|</div>',
  '1-10 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum| dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum^ dolor sit</span> amet|</div>',
  '1-11 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum |dolor sit</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum ^dolor sit</span> amet|</div>',
  '1-12 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum d|olor sit</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum d^olor sit</span> amet|</div>',
  '1-13 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum do|lor sit</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum do^lor sit</span> amet|</div>',
  '1-14 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dol|or sit</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dol^or sit</span> amet|</div>',
  '1-15 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolo|r sit</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolo^r sit</span> amet|</div>',
  '1-16 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor| sit</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor^ sit</span> amet|</div>',
  '1-17 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor |sit</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor ^sit</span> amet|</div>',
  '1-18 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor s|it</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor s^it</span> amet|</div>',
  '1-19 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor si|t</span> amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor si^t</span> amet|</div>',
  '1-20 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span>| amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span>^ amet|</div>',
  '1-21 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span> |amet</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span> ^amet|</div>',
  '1-22 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span> a|met</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span> a^met|</div>',
  '1-23 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span> am|et</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span> am^et|</div>',
  '1-24 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span> ame|t</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span> ame^t|</div>',
  '1-25 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span> amet|</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span> amet|</div>',
  '1-26 ltr forward lineboundary');
</script>