chromium/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_12.html

<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>
if (window.internals)
  internals.settings.setEditingBehavior('win');

selection_test(
  '<div contenteditable dir="rtl">|אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא |בבב צצצ aaa bbb ccc דדד עעע פפפ</div>',
  '12-0 left word');

selection_test(
  '<div contenteditable dir="rtl">א|אא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא |בבב צצצ aaa bbb ccc דדד עעע פפפ</div>',
  '12-1 left word');

selection_test(
  '<div contenteditable dir="rtl">אא|א בבב צצצ aaa bbb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא |בבב צצצ aaa bbb ccc דדד עעע פפפ</div>',
  '12-2 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא| בבב צצצ aaa bbb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 |\u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
  '12-3 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא |בבב צצצ aaa bbb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא בבב |צצצ aaa bbb ccc דדד עעע פפפ</div>',
  '12-4 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא ב|בב צצצ aaa bbb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא בבב |צצצ aaa bbb ccc דדד עעע פפפ</div>',
  '12-5 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בב|ב צצצ aaa bbb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא בבב |צצצ aaa bbb ccc דדד עעע פפפ</div>',
  '12-6 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב| צצצ aaa bbb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 |\u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
  '12-7 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב |צצצ aaa bbb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>',
  '12-8 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צ|צצ aaa bbb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>',
  '12-9 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצ|צ aaa bbb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>',
  '12-10 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ| aaa bbb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 |aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
  '12-11 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa |bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
  '12-12 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ a|aa bbb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa |bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
  '12-13 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aa|a bbb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa |bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
  '12-14 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa| bbb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa |bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
  '12-15 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa |bbb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb |ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
  '12-16 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa b|bb ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb |ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
  '12-17 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bb|b ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb |ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
  '12-18 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb| ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb |ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
  '12-19 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb |ccc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc |\u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
  '12-20 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb c|cc דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc |\u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
  '12-21 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb cc|c דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc |\u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
  '12-22 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc| דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc |\u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
  '12-23 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד |עעע פפפ</div>',
  '12-24 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc ד|דד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד |עעע פפפ</div>',
  '12-25 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דד|ד עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד |עעע פפפ</div>',
  '12-26 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד| עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 |\u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
  '12-27 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד |עעע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע |פפפ</div>',
  '12-28 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד ע|עע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע |פפפ</div>',
  '12-29 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עע|ע פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע |פפפ</div>',
  '12-30 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע| פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 |\u05E4\u05E4\u05E4</div>',
  '12-31 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע |פפפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע פפפ|</div>',
  '12-32 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע פ|פפ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע פפפ|</div>',
  '12-33 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע פפ|פ</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע פפפ|</div>',
  '12-34 left word');

selection_test(
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע פפפ|</div>',
  selection => selection.modify('move', 'left', 'word'),
  '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע פפפ|</div>',
  '12-35 left word');
</script>