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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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