chromium/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_33.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="ltr" style="white-space:pre">|abc def hij    אבצ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc |def hij    אבצ דעפ היח    opq rst uvw</div>',
  '33-0 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">a|bc def hij    אבצ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc |def hij    אבצ דעפ היח    opq rst uvw</div>',
  '33-1 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">ab|c def hij    אבצ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc |def hij    אבצ דעפ היח    opq rst uvw</div>',
  '33-2 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc| def hij    אבצ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc |def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
  '33-3 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc |def hij    אבצ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def |hij    אבצ דעפ היח    opq rst uvw</div>',
  '33-4 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc d|ef hij    אבצ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def |hij    אבצ דעפ היח    opq rst uvw</div>',
  '33-5 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc de|f hij    אבצ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def |hij    אבצ דעפ היח    opq rst uvw</div>',
  '33-6 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def| hij    אבצ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def |hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
  '33-7 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def |hij    אבצ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    |אבצ דעפ היח    opq rst uvw</div>',
  '33-8 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def h|ij    אבצ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    |אבצ דעפ היח    opq rst uvw</div>',
  '33-9 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hi|j    אבצ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    |אבצ דעפ היח    opq rst uvw</div>',
  '33-10 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij|    אבצ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    |\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
  '33-11 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij |   אבצ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    |\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
  '33-12 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij  |  אבצ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    |\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
  '33-13 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij   | אבצ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    |\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
  '33-14 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    |אבצ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
  '33-15 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    א|בצ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
  '33-16 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אב|צ דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
  '33-17 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ| דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
  '33-18 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ |דעפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |\u05D4\u05D9\u05D7    opq rst uvw</div>',
  '33-19 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ ד|עפ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |\u05D4\u05D9\u05D7    opq rst uvw</div>',
  '33-20 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דע|פ היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |\u05D4\u05D9\u05D7    opq rst uvw</div>',
  '33-21 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ| היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |\u05D4\u05D9\u05D7    opq rst uvw</div>',
  '33-22 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ |היח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    |opq rst uvw</div>',
  '33-23 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ ה|יח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    |opq rst uvw</div>',
  '33-24 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ הי|ח    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    |opq rst uvw</div>',
  '33-25 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח|    opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    |opq rst uvw</div>',
  '33-26 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח |   opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    |opq rst uvw</div>',
  '33-27 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח  |  opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    |opq rst uvw</div>',
  '33-28 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח   | opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    |opq rst uvw</div>',
  '33-29 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    |opq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq |rst uvw</div>',
  '33-30 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    o|pq rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq |rst uvw</div>',
  '33-31 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    op|q rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq |rst uvw</div>',
  '33-32 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq| rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq |rst uvw</div>',
  '33-33 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq |rst uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq rst |uvw</div>',
  '33-34 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq r|st uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq rst |uvw</div>',
  '33-35 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq rs|t uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq rst |uvw</div>',
  '33-36 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq rst| uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst |uvw</div>',
  '33-37 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq rst |uvw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq rst uvw|</div>',
  '33-38 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq rst u|vw</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq rst uvw|</div>',
  '33-39 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq rst uv|w</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq rst uvw|</div>',
  '33-40 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq rst uvw|</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq rst uvw|</div>',
  '33-41 right word');
</script>