chromium/third_party/blink/web_tests/editing/selection/extend/extend_selection_05_rtl_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="rtl">|Lorem <div  dir="rtl">ipsum dolor sit</div> amett</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">|Lorem <div dir="rtl">ipsum dolor sit</div> amett</div>',
  '5-0 rtl backward lineboundary');

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

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

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

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

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

selection_test(
  '<div contenteditable dir="rtl">Lorem <div  dir="rtl">|ipsum dolor sit</div> amett</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">Lorem <div dir="rtl">|ipsum dolor sit</div> amett</div>',
  '5-6 rtl backward lineboundary');

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

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

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

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

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

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

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

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

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

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

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

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

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

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

selection_test(
  '<div contenteditable dir="rtl">Lorem <div  dir="rtl">ipsum dolor sit</div>| amett</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">Lorem <div dir="rtl">ipsum dolor sit</div> |amett</div>',
  '5-21 rtl backward lineboundary');

selection_test(
  '<div contenteditable dir="rtl">Lorem <div  dir="rtl">ipsum dolor sit</div> |amett</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">Lorem <div dir="rtl">ipsum dolor sit</div> |amett</div>',
  '5-22 rtl backward lineboundary');

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

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

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

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

selection_test(
  '<div contenteditable dir="rtl">Lorem <div  dir="rtl">ipsum dolor sit</div> amett|</div>',
  selection => selection.modify('extend', 'backward', 'lineboundary'),
  '<div contenteditable dir="rtl">Lorem <div dir="rtl">ipsum dolor sit</div> |amett^</div>',
  '5-27 rtl backward lineboundary');
</script>