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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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