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

<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>
const isMac = navigator.platform.indexOf('Mac') === 0;
const kBehaviors = window.internals ? ['mac', 'win'] : isMac ? ['mac'] : ['win'];
for (const behavior of kBehaviors) {
  if (window.internals) {
    internals.settings.setEditingBehavior(behavior);
    internals.settings.setSelectTrailingWhitespaceEnabled(behavior !== 'mac');
  }

selection_test(
  '<div contenteditable dir="rtl">|they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">|they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-0 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">t|hey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">|t^hey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-1 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">th|ey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">|th^ey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-2 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">the|y said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">|the^y said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-3 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they| said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">|they^ said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-4 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">|they ^said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-5 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they s|aid "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they |s^aid "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-6 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they sa|id "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they |sa^id "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-7 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they sai|d "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they |sai^d "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-8 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they said| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they |said^ "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-9 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they said |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they |said ^"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-10 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they said "|\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they said |"^\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-11 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they said "\u202B|car \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they said |"\u202B^car \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-12 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bc|ar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they said "\u202B|c^ar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-13 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bca|r \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they said "\u202B|ca^r \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-14 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar| \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they said "\u202B|car^ \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-15 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they said "\u202B|car ^\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-16 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3|\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they said "\u202Bcar |\u05D3^\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-17 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4|\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they said "\u202Bcar |\u05D3\u05D4^\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-18 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they said "\u202Bcar |\u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-19 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they said "\u202Bcar |\u05D3\u05D4\u05D5 ^\u05D0\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-20 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0|\u05D1\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 |\u05D0^\u05D1\u05D2\u202C."</div>',
  `${behavior} 18-21 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1|\u05D2\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 |\u05D0\u05D1^\u05D2\u202C."</div>',
  `${behavior} 18-22 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2|\u202C."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2^\u202C."</div>',
  `${behavior} 18-23 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C|."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\u202C^."</div>',
  `${behavior} 18-24 rtl right word`);

selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C.|"</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C|.^"</div>',
  `${behavior} 18-25 rtl right word`);

  selection_test(
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C|."</div>',
  selection => selection.modify('extend', 'right', 'word'),
  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\u202C^."</div>',
  `${behavior} 18-26 rtl right word`);
}
</script>