chromium/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_23.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    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    def    hij    opq    </div>',
  '23-0 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre"> |   abc    def    hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    def    hij    opq    </div>',
  '23-1 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">  |  abc    def    hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    def    hij    opq    </div>',
  '23-2 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">   | abc    def    hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    def    hij    opq    </div>',
  '23-3 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    def    hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    opq    </div>',
  '23-4 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    a|bc    def    hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    opq    </div>',
  '23-5 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    ab|c    def    hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    opq    </div>',
  '23-6 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc|    def    hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    opq    </div>',
  '23-7 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc |   def    hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    opq    </div>',
  '23-8 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc  |  def    hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    opq    </div>',
  '23-9 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc   | def    hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    opq    </div>',
  '23-10 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    opq    </div>',
  '23-11 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    d|ef    hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    opq    </div>',
  '23-12 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    de|f    hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    opq    </div>',
  '23-13 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def|    hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    opq    </div>',
  '23-14 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def |   hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    opq    </div>',
  '23-15 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def  |  hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    opq    </div>',
  '23-16 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def   | hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    opq    </div>',
  '23-17 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |opq    </div>',
  '23-18 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    h|ij    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |opq    </div>',
  '23-19 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hi|j    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |opq    </div>',
  '23-20 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij|    opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |opq    </div>',
  '23-21 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij |   opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |opq    </div>',
  '23-22 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij  |  opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |opq    </div>',
  '23-23 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij   | opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |opq    </div>',
  '23-24 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |opq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    opq|    </div>',
  '23-25 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    o|pq    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    opq|    </div>',
  '23-26 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    op|q    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    opq|    </div>',
  '23-27 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    opq|    </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    opq    |</div>',
  '23-28 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    opq |   </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    opq    |</div>',
  '23-29 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    opq  |  </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    opq    |</div>',
  '23-30 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    opq   | </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    opq    |</div>',
  '23-31 right word');

selection_test(
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    opq    |</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    opq    |</div>',
  '23-32 right word');
</script>