chromium/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_18.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">|abc def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc |def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  '18-0 right word');

selection_test(
  '<div contenteditable dir="ltr">a|bc def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc |def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  '18-1 right word');

selection_test(
  '<div contenteditable dir="ltr">ab|c def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc |def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  '18-2 right word');

selection_test(
  '<div contenteditable dir="ltr">abc| def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc |def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  '18-3 right word');

selection_test(
  '<div contenteditable dir="ltr">abc |def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def |hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  '18-4 right word');

selection_test(
  '<div contenteditable dir="ltr">abc d|ef hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def |hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  '18-5 right word');

selection_test(
  '<div contenteditable dir="ltr">abc de|f hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def |hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  '18-6 right word');

selection_test(
  '<div contenteditable dir="ltr">abc def| hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def |hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  '18-7 right word');

selection_test(
  '<div contenteditable dir="ltr">abc def |hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def hij |<img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  '18-8 right word');

selection_test(
  '<div contenteditable dir="ltr">abc def h|ij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def hij |<img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  '18-9 right word');

selection_test(
  '<div contenteditable dir="ltr">abc def hi|j <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def hij |<img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  '18-10 right word');

selection_test(
  '<div contenteditable dir="ltr">abc def hij| <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> |opq rst </div>',
  '18-11 right word');

selection_test(
  '<div contenteditable dir="ltr">abc def hij |<img src="../../../accessibility/resources/cake.png"> opq rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> |opq rst </div>',
  '18-12 right word');

selection_test(
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png">| opq rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> |opq rst </div>',
  '18-13 right word');

selection_test(
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> |opq rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq |rst </div>',
  '18-14 right word');

selection_test(
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> o|pq rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq |rst </div>',
  '18-15 right word');

selection_test(
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> op|q rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq |rst </div>',
  '18-16 right word');

selection_test(
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq| rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq |rst </div>',
  '18-17 right word');

selection_test(
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq |rst </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq rst| </div>',
  '18-18 right word');

selection_test(
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq r|st </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq rst| </div>',
  '18-19 right word');

selection_test(
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq rs|t </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq rst| </div>',
  '18-20 right word');

selection_test(
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq rst| </div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq rst| </div>',
  '18-21 right word');

selection_test(
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq rst |</div>',
  selection => selection.modify('move', 'right', 'word'),
  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq rst| </div>',
  '18-22 right word');
</script>