Convert editing/selection/modify_move/move-by-word-visually-single-space-one-element.html with selection_test This patch converts the web test with selection_test() so that the test cases are more explicit and the expectations are easier to maintain. This is a preparation for switching to logical left/right caret movement: crrev.com/c/1593632 Bug: 958831 Change-Id: I1a48469f71c269c0b752e2540a79d3eeb87f1dda Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1594619 Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Auto-Submit: Xiaocheng Hu <xiaochengh@chromium.org> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#657287}
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move-by-word-visually-single-space-one-element.html b/third_party/blink/web_tests/editing/selection/modify_move/move-by-word-visually-single-space-one-element.html deleted file mode 100644 index 0b9d2ba..0000000 --- a/third_party/blink/web_tests/editing/selection/modify_move/move-by-word-visually-single-space-one-element.html +++ /dev/null
@@ -1,69 +0,0 @@ -<!DOCTYPE HTML> -<html> -<head> -<script src="../../../resources/testharness.js"></script> -<script src="../../../resources/testharnessreport.js"></script> -<script src="resources/move-by-word-visually.js"></script> -<script> -onload = runTest; -if (window.testRunner && window.internals) - internals.settings.setEditingBehavior('win'); -</script> -</head> -<body> -<div id="testMoveByWord"> -<!-- -Title saves the word breaks. -The format of title is "xxx|xxxx". - -The sequence on the left of "|" is word boundaries when moving caret from left to right. -The sequence on the right of "|" is word boundaries when moving caret from right to left. - -If there is a single node in the line, the sequence are offsets. -If there are multiple nodes in the line, the sequence is array of [anchor_node_id, offset, child_node_index], -where child_node_index is optional, default is the first child of the anchor node. ---> -<!-- pure English --> -<div dir=ltr class="test_move_by_word" title="0 4 8 12 16 19|19 16 12 8 4 0" contenteditable>abc def hij opq rst</div> -<div dir=rtl class="test_move_by_word" title="19 3 7 11 15 0|0 15 11 7 3 19" contenteditable>abc def hij opq rst</div> - -<!-- pure Hebrew --> -<div dir=ltr class="test_move_by_word" title="0 15 11 7 3 19|19 3 7 11 15 0" contenteditable>ששש נננ בבב גגג קקק</div> -<div dir=rtl class="test_move_by_word" title="19 16 12 8 4 0|0 4 8 12 16 19" contenteditable>ששש נננ בבב גגג קקק</div> - -<!-- bidi text --> -<!-- English Hebrew English --> -<div dir=ltr class="test_move_by_word" title="0 4 8 12 19 15 24 28 32 35|35 32 28 24 15 19 12 8 4 0" contenteditable>abc def hij אאא בבב צצצ opr uvw xyz</div> -<div dir=rtl class="test_move_by_word" title="35 27 31 24 20 16 12 3 7 0|0 7 3 12 16 20 24 31 27 35" contenteditable>abc def hij אאא בבב צצצ opr uvw xyz</div> - -<div dir=ltr class="test_move_by_word" title="0 4 8 11 16 20 23|23 20 16 11 8 4 0" contenteditable>abc def שנב סטז uvw xyz</div> -<div dir=rtl class="test_move_by_word" title="23 19 16 12 8 3 0|0 3 8 12 16 19 23" contenteditable>abc def שנב סטז uvw xyz</div> - -<div dir=ltr class="test_move_by_word" title="0 4 8 11|11 8 4 0" contenteditable>aaa אאא bbb</div> -<div dir=rtl class="test_move_by_word" title="11 8 4 0|0 4 8 11" contenteditable>aaa אאא bbb</div> - -<!-- Hebrew English Hebrew --> -<div dir=ltr class="test_move_by_word" title="0 7 3 12 16 20 24 31 27 35|35 27 31 24 20 16 12 3 7 0" contenteditable>אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div> -<div dir=rtl class="test_move_by_word" title="35 32 28 24 15 19 12 8 4 0|0 4 8 12 19 15 24 28 32 35" contenteditable>אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div> - -<div dir=ltr class="test_move_by_word" title="0 3 8 12 16 19 23|23 19 16 12 8 3 0" contenteditable>אאא בבב aaa bbb צצצ דדד</div> -<div dir=rtl class="test_move_by_word" title="23 20 16 11 8 4 0|0 4 8 11 16 20 23" contenteditable>אאא בבב aaa bbb צצצ דדד</div> - -<div dir=ltr class="test_move_by_word" title="0 4 8 11|11 8 4 0" contenteditable>שנב abc סטז</div> -<div dir=rtl class="test_move_by_word" title="11 8 4 0|0 4 8 11" contenteditable>שנב abc סטז</div> - -<!-- Test with Bidi control characters --> -<div dir=ltr class="test_move_by_word" id="notReachablePosition" title="0 9 8 14 17|17 14 8 9 0" contenteditable>abc ‫באד def‬ xyz</div> - -<!-- Test with image -- non-inline-text-box --> -<div id="d_1" dir=ltr class="test_move_by_word" contenteditable title="[d_1, 0, 1][d_1, 4, 1][d_1, 8, 1][d_1, 1, 3][d_1, 5, 3][d_1, 8, 3]|[d_1, 8, 3][d_1, 5, 3][d_1, 1, 3][d_1, 8, 1][d_1, 4, 1][d_1, 0, 1]">abc def hij <img src=../../../accessibility/resources/cake.png> opq rst </div> - -<div id="d_2" dir=ltr class="test_move_by_word" contenteditable title="[d_2, 0, 1][d_2, 4, 1][d_2, 8, 1][d_2, 4, 5][d_2, 8, 5][d_2, 11, 5]|[d_2, 11, 5][d_2, 8, 5][d_2, 4, 5][d_2, 8, 1][d_2, 4, 1][d_2, 0, 1]">abc def this<span>is</span><span>one</span><span>word</span>end opq rst </div> - -<!-- empty div --> -<div dir=ltr class="test_move_by_word" title="0|0" contenteditable></div> - -</div> -<pre id="console"></pre> -</body> -</html>
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_1.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_1.html new file mode 100644 index 0000000..db194afb --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_1.html
@@ -0,0 +1,129 @@ +<!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 opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def hij opq rst</div>', + '1-0 left word'); + +selection_test( + '<div contenteditable dir="ltr">a|bc def hij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def hij opq rst</div>', + '1-1 left word'); + +selection_test( + '<div contenteditable dir="ltr">ab|c def hij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def hij opq rst</div>', + '1-2 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc| def hij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def hij opq rst</div>', + '1-3 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc |def hij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def hij opq rst</div>', + '1-4 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc d|ef hij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def hij opq rst</div>', + '1-5 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc de|f hij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def hij opq rst</div>', + '1-6 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def| hij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def hij opq rst</div>', + '1-7 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def |hij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def hij opq rst</div>', + '1-8 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def h|ij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |hij opq rst</div>', + '1-9 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hi|j opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |hij opq rst</div>', + '1-10 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij| opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |hij opq rst</div>', + '1-11 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij |opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |hij opq rst</div>', + '1-12 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij o|pq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij |opq rst</div>', + '1-13 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij op|q rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij |opq rst</div>', + '1-14 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij opq| rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij |opq rst</div>', + '1-15 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij opq |rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij |opq rst</div>', + '1-16 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij opq r|st</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij opq |rst</div>', + '1-17 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij opq rs|t</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij opq |rst</div>', + '1-18 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij opq rst|</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij opq |rst</div>', + '1-19 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_10.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_10.html new file mode 100644 index 0000000..a43a50c --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_10.html
@@ -0,0 +1,81 @@ +<!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</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">aaa |אאא bbb</div>', + '10-0 left word'); + +selection_test( + '<div contenteditable dir="rtl">a|aa אאא bbb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">aaa |אאא bbb</div>', + '10-1 left word'); + +selection_test( + '<div contenteditable dir="rtl">aa|a אאא bbb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">aaa |אאא bbb</div>', + '10-2 left word'); + +selection_test( + '<div contenteditable dir="rtl">aaa| אאא bbb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">aaa |אאא bbb</div>', + '10-3 left word'); + +selection_test( + '<div contenteditable dir="rtl">aaa |אאא bbb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">aaa אאא |bbb</div>', + '10-4 left word'); + +selection_test( + '<div contenteditable dir="rtl">aaa א|אא bbb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">aaa אאא |bbb</div>', + '10-5 left word'); + +selection_test( + '<div contenteditable dir="rtl">aaa אא|א bbb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">aaa אאא |bbb</div>', + '10-6 left word'); + +selection_test( + '<div contenteditable dir="rtl">aaa אאא| bbb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">aaa אאא |bbb</div>', + '10-7 left word'); + +selection_test( + '<div contenteditable dir="rtl">aaa אאא |bbb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">aaa אאא bbb|</div>', + '10-8 left word'); + +selection_test( + '<div contenteditable dir="rtl">aaa אאא b|bb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">aaa אאא bbb|</div>', + '10-9 left word'); + +selection_test( + '<div contenteditable dir="rtl">aaa אאא bb|b</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">aaa אאא bbb|</div>', + '10-10 left word'); + +selection_test( + '<div contenteditable dir="rtl">aaa אאא bbb|</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">aaa אאא bbb|</div>', + '10-11 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_11.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_11.html new file mode 100644 index 0000000..2706d24 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_11.html
@@ -0,0 +1,225 @@ +<!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">|אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-0 left word'); + +selection_test( + '<div contenteditable dir="ltr">א|אא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא| בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-1 left word'); + +selection_test( + '<div contenteditable dir="ltr">אא|א בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא| בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-2 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא| בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב| צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-3 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא |בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב| צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-4 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא ב|בב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב| צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-5 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בב|ב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב| צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-6 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב| צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-7 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב |צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-8 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צ|צצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-9 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצ|צ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-10 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ| aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא| בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-11 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא| בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-12 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ a|aa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>', + '11-13 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aa|a bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>', + '11-14 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa| bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>', + '11-15 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa |bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>', + '11-16 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa b|bb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa |bbb ccc דדד עעע פפפ</div>', + '11-17 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bb|b ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa |bbb ccc דדד עעע פפפ</div>', + '11-18 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb| ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa |bbb ccc דדד עעע פפפ</div>', + '11-19 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb |ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa |bbb ccc דדד עעע פפפ</div>', + '11-20 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb c|cc דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb |ccc דדד עעע פפפ</div>', + '11-21 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb cc|c דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb |ccc דדד עעע פפפ</div>', + '11-22 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc| דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb |ccc דדד עעע פפפ</div>', + '11-23 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb |ccc דדד עעע פפפ</div>', + '11-24 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc ד|דד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד| עעע פפפ</div>', + '11-25 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דד|ד עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד| עעע פפפ</div>', + '11-26 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד| עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע| פפפ</div>', + '11-27 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד |עעע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע| פפפ</div>', + '11-28 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד ע|עע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע| פפפ</div>', + '11-29 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עע|ע פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע| פפפ</div>', + '11-30 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע| פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</div>', + '11-31 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע |פפפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</div>', + '11-32 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע פ|פפ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</div>', + '11-33 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע פפ|פ</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</div>', + '11-34 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע פפפ|</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד| עעע פפפ</div>', + '11-35 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_12.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_12.html new file mode 100644 index 0000000..c0a33e4 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_12.html
@@ -0,0 +1,225 @@ +<!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">אאא |בבב צצצ aaa bbb ccc דדד עעע פפפ</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">אאא בבב |צצצ aaa bbb ccc דדד עעע פפפ</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">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</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">אאא בבב צצצ aaa bbb| ccc דדד עעע פפפ</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">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</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">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</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">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</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">אאא בבב צצצ aaa| bbb ccc דדד עעע פפפ</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">אאא בבב צצצ aaa| bbb ccc דדד עעע פפפ</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">אאא בבב צצצ aaa| bbb ccc דדד עעע פפפ</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">אאא בבב צצצ aaa| bbb ccc דדד עעע פפפ</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">אאא בבב צצצ aaa bbb| ccc דדד עעע פפפ</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">אאא בבב צצצ aaa bbb| ccc דדד עעע פפפ</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">אאא בבב צצצ aaa bbb| ccc דדד עעע פפפ</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">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</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">אאא בבב צצצ aaa bbb ccc דדד |עעע פפפ</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">אאא בבב צצצ aaa bbb ccc דדד עעע |פפפ</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> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_13.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_13.html new file mode 100644 index 0000000..d16ccaf3 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_13.html
@@ -0,0 +1,153 @@ +<!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">|אאא בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|אאא בבב aaa bbb צצצ דדד</div>', + '13-0 left word'); + +selection_test( + '<div contenteditable dir="ltr">א|אא בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא| בבב aaa bbb צצצ דדד</div>', + '13-1 left word'); + +selection_test( + '<div contenteditable dir="ltr">אא|א בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא| בבב aaa bbb צצצ דדד</div>', + '13-2 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא| בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|אאא בבב aaa bbb צצצ דדד</div>', + '13-3 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא |בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|אאא בבב aaa bbb צצצ דדד</div>', + '13-4 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא ב|בב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|אאא בבב aaa bbb צצצ דדד</div>', + '13-5 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בב|ב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|אאא בבב aaa bbb צצצ דדד</div>', + '13-6 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב| aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא| בבב aaa bbb צצצ דדד</div>', + '13-7 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב |aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא| בבב aaa bbb צצצ דדד</div>', + '13-8 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב a|aa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב |aaa bbb צצצ דדד</div>', + '13-9 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aa|a bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב |aaa bbb צצצ דדד</div>', + '13-10 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa| bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב |aaa bbb צצצ דדד</div>', + '13-11 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa |bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב |aaa bbb צצצ דדד</div>', + '13-12 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa b|bb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa |bbb צצצ דדד</div>', + '13-13 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bb|b צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa |bbb צצצ דדד</div>', + '13-14 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb| צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa |bbb צצצ דדד</div>', + '13-15 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb |צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa |bbb צצצ דדד</div>', + '13-16 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb צ|צצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ| דדד</div>', + '13-17 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצ|צ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ| דדד</div>', + '13-18 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ| דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb |צצצ דדד</div>', + '13-19 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ |דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb |צצצ דדד</div>', + '13-20 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ ד|דד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb |צצצ דדד</div>', + '13-21 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ דד|ד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb |צצצ דדד</div>', + '13-22 left word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ דדד|</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ| דדד</div>', + '13-23 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_14.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_14.html new file mode 100644 index 0000000..39706b566 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_14.html
@@ -0,0 +1,153 @@ +<!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 צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא |בבב aaa bbb צצצ דדד</div>', + '14-0 left word'); + +selection_test( + '<div contenteditable dir="rtl">א|אא בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא |בבב aaa bbb צצצ דדד</div>', + '14-1 left word'); + +selection_test( + '<div contenteditable dir="rtl">אא|א בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא |בבב aaa bbb צצצ דדד</div>', + '14-2 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא| בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא |בבב aaa bbb צצצ דדד</div>', + '14-3 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא |בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב |aaa bbb צצצ דדד</div>', + '14-4 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא ב|בב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב |aaa bbb צצצ דדד</div>', + '14-5 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בב|ב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב |aaa bbb צצצ דדד</div>', + '14-6 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב| aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב |aaa bbb צצצ דדד</div>', + '14-7 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב |aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa| bbb צצצ דדד</div>', + '14-8 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב a|aa bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb |צצצ דדד</div>', + '14-9 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aa|a bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb |צצצ דדד</div>', + '14-10 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa| bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb |צצצ דדד</div>', + '14-11 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa |bbb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa| bbb צצצ דדד</div>', + '14-12 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa b|bb צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa| bbb צצצ דדד</div>', + '14-13 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bb|b צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa| bbb צצצ דדד</div>', + '14-14 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb| צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb |צצצ דדד</div>', + '14-15 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb |צצצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ |דדד</div>', + '14-16 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb צ|צצ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ |דדד</div>', + '14-17 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצ|צ דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ |דדד</div>', + '14-18 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ| דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ |דדד</div>', + '14-19 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ |דדד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ דדד|</div>', + '14-20 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ ד|דד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ דדד|</div>', + '14-21 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ דד|ד</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ דדד|</div>', + '14-22 left word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ דדד|</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ דדד|</div>', + '14-23 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_15.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_15.html new file mode 100644 index 0000000..41f0fe8 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_15.html
@@ -0,0 +1,81 @@ +<!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 סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|שנב abc סטז</div>', + '15-0 left word'); + +selection_test( + '<div contenteditable dir="ltr">ש|נב abc סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|שנב abc סטז</div>', + '15-1 left word'); + +selection_test( + '<div contenteditable dir="ltr">שנ|ב abc סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|שנב abc סטז</div>', + '15-2 left word'); + +selection_test( + '<div contenteditable dir="ltr">שנב| abc סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|שנב abc סטז</div>', + '15-3 left word'); + +selection_test( + '<div contenteditable dir="ltr">שנב |abc סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|שנב abc סטז</div>', + '15-4 left word'); + +selection_test( + '<div contenteditable dir="ltr">שנב a|bc סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">שנב |abc סטז</div>', + '15-5 left word'); + +selection_test( + '<div contenteditable dir="ltr">שנב ab|c סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">שנב |abc סטז</div>', + '15-6 left word'); + +selection_test( + '<div contenteditable dir="ltr">שנב abc| סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">שנב |abc סטז</div>', + '15-7 left word'); + +selection_test( + '<div contenteditable dir="ltr">שנב abc |סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">שנב |abc סטז</div>', + '15-8 left word'); + +selection_test( + '<div contenteditable dir="ltr">שנב abc ס|טז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">שנב abc |סטז</div>', + '15-9 left word'); + +selection_test( + '<div contenteditable dir="ltr">שנב abc סט|ז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">שנב abc |סטז</div>', + '15-10 left word'); + +selection_test( + '<div contenteditable dir="ltr">שנב abc סטז|</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">שנב abc |סטז</div>', + '15-11 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_16.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_16.html new file mode 100644 index 0000000..a0184a0 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_16.html
@@ -0,0 +1,81 @@ +<!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">|שנב abc סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">שנב |abc סטז</div>', + '16-0 left word'); + +selection_test( + '<div contenteditable dir="rtl">ש|נב abc סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">שנב |abc סטז</div>', + '16-1 left word'); + +selection_test( + '<div contenteditable dir="rtl">שנ|ב abc סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">שנב |abc סטז</div>', + '16-2 left word'); + +selection_test( + '<div contenteditable dir="rtl">שנב| abc סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">שנב |abc סטז</div>', + '16-3 left word'); + +selection_test( + '<div contenteditable dir="rtl">שנב |abc סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">שנב abc |סטז</div>', + '16-4 left word'); + +selection_test( + '<div contenteditable dir="rtl">שנב a|bc סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">שנב abc |סטז</div>', + '16-5 left word'); + +selection_test( + '<div contenteditable dir="rtl">שנב ab|c סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">שנב abc |סטז</div>', + '16-6 left word'); + +selection_test( + '<div contenteditable dir="rtl">שנב abc| סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">שנב abc |סטז</div>', + '16-7 left word'); + +selection_test( + '<div contenteditable dir="rtl">שנב abc |סטז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">שנב abc סטז|</div>', + '16-8 left word'); + +selection_test( + '<div contenteditable dir="rtl">שנב abc ס|טז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">שנב abc סטז|</div>', + '16-9 left word'); + +selection_test( + '<div contenteditable dir="rtl">שנב abc סט|ז</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">שנב abc סטז|</div>', + '16-10 left word'); + +selection_test( + '<div contenteditable dir="rtl">שנב abc סטז|</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">שנב abc סטז|</div>', + '16-11 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_17.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_17.html new file mode 100644 index 0000000..2446614 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_17.html
@@ -0,0 +1,117 @@ +<!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 \u202Bבאד def\u202C xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc \u202Bבאד def\u202C xyz</div>', + '17-0 left word'); + +selection_test( + '<div contenteditable dir="ltr">a|bc \u202Bבאד def\u202C xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc \u202Bבאד def\u202C xyz</div>', + '17-1 left word'); + +selection_test( + '<div contenteditable dir="ltr">ab|c \u202Bבאד def\u202C xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc \u202Bבאד def\u202C xyz</div>', + '17-2 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc| \u202Bבאד def\u202C xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc \u202Bבאד def\u202C xyz</div>', + '17-3 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc |\u202Bבאד def\u202C xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc \u202Bבאד def\u202C xyz</div>', + '17-4 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202B|באד def\u202C xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד| def\u202C xyz</div>', + '17-5 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bב|אד def\u202C xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד| def\u202C xyz</div>', + '17-6 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבא|ד def\u202C xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד| def\u202C xyz</div>', + '17-7 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד| def\u202C xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד |def\u202C xyz</div>', + '17-8 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד |def\u202C xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc \u202Bבאד def\u202C xyz</div>', + '17-9 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד d|ef\u202C xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד |def\u202C xyz</div>', + '17-10 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד de|f\u202C xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד |def\u202C xyz</div>', + '17-11 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד def|\u202C xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד| def\u202C xyz</div>', + '17-12 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C| xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד| def\u202C xyz</div>', + '17-13 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C |xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד| def\u202C xyz</div>', + '17-14 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C x|yz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C |xyz</div>', + '17-15 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C xy|z</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C |xyz</div>', + '17-16 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C xyz|</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C |xyz</div>', + '17-17 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_18.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_18.html new file mode 100644 index 0000000..6abbc872 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_18.html
@@ -0,0 +1,147 @@ +<!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', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + '18-0 left word'); + +selection_test( + '<div contenteditable dir="ltr">a|bc def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + '18-1 left word'); + +selection_test( + '<div contenteditable dir="ltr">ab|c def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + '18-2 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc| def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + '18-3 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc |def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + '18-4 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc d|ef hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + '18-5 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc de|f hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + '18-6 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def| hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + '18-7 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def |hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + '18-8 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def h|ij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + '18-9 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hi|j <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + '18-10 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij| <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + '18-11 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij |<img src="../../../accessibility/resources/cake.png"> opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + '18-12 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png">| opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + '18-13 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> |opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>', + '18-14 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> o|pq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> |opq rst </div>', + '18-15 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> op|q rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> |opq rst </div>', + '18-16 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq| rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> |opq rst </div>', + '18-17 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq |rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> |opq rst </div>', + '18-18 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq r|st </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq |rst </div>', + '18-19 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq rs|t </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq |rst </div>', + '18-20 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq rst| </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq |rst </div>', + '18-21 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq rst |</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq |rst </div>', + '18-22 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_19.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_19.html new file mode 100644 index 0000000..6dd36f8 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_19.html
@@ -0,0 +1,237 @@ +<!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 this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-0 left word'); + +selection_test( + '<div contenteditable dir="ltr">a|bc def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-1 left word'); + +selection_test( + '<div contenteditable dir="ltr">ab|c def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-2 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc| def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-3 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc |def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-4 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc d|ef this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-5 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc de|f this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-6 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def| this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-7 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-8 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def t|his<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-9 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def th|is<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-10 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def thi|s<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-11 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this|<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-12 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>|is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-13 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>i|s</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-14 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is|</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-15 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>|one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-16 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>o|ne</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-17 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>on|e</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-18 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one|</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-19 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>|word</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-20 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>w|ord</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-21 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>wo|rd</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-22 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>wor|d</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-23 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word|</span>end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-24 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>|end opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-25 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>e|nd opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-26 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>en|d opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-27 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end| opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-28 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-29 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end o|pq rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-30 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end op|q rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-31 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq| rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-32 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq |rst </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-33 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq r|st </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq |rst </div>', + '19-34 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq rs|t </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq |rst </div>', + '19-35 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq rst| </div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq |rst </div>', + '19-36 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq rst |</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq |rst </div>', + '19-37 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_2.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_2.html new file mode 100644 index 0000000..51b8018 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_2.html
@@ -0,0 +1,129 @@ +<!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">|abc def hij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij opq| rst</div>', + '2-0 left word'); + +selection_test( + '<div contenteditable dir="rtl">a|bc def hij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij opq rst|</div>', + '2-1 left word'); + +selection_test( + '<div contenteditable dir="rtl">ab|c def hij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij opq rst|</div>', + '2-2 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc| def hij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij opq rst|</div>', + '2-3 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc |def hij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc| def hij opq rst</div>', + '2-4 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc d|ef hij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc| def hij opq rst</div>', + '2-5 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc de|f hij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc| def hij opq rst</div>', + '2-6 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def| hij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc| def hij opq rst</div>', + '2-7 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def |hij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def| hij opq rst</div>', + '2-8 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def h|ij opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def| hij opq rst</div>', + '2-9 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hi|j opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def| hij opq rst</div>', + '2-10 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij| opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def| hij opq rst</div>', + '2-11 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij |opq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij| opq rst</div>', + '2-12 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij o|pq rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij| opq rst</div>', + '2-13 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij op|q rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij| opq rst</div>', + '2-14 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij opq| rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij| opq rst</div>', + '2-15 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij opq |rst</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij opq| rst</div>', + '2-16 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij opq r|st</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij opq| rst</div>', + '2-17 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij opq rs|t</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij opq| rst</div>', + '2-18 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij opq rst|</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij opq rst|</div>', + '2-19 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_20.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_20.html new file mode 100644 index 0000000..5766f19 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_20.html
@@ -0,0 +1,15 @@ +<!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">|</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|</div>', + '20-0 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_3.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_3.html new file mode 100644 index 0000000..bd4f0c2 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_3.html
@@ -0,0 +1,129 @@ +<!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">|ששש נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|ששש נננ בבב גגג קקק</div>', + '3-0 left word'); + +selection_test( + '<div contenteditable dir="ltr">ש|שש נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">ששש| נננ בבב גגג קקק</div>', + '3-1 left word'); + +selection_test( + '<div contenteditable dir="ltr">שש|ש נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">ששש| נננ בבב גגג קקק</div>', + '3-2 left word'); + +selection_test( + '<div contenteditable dir="ltr">ששש| נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">ששש נננ| בבב גגג קקק</div>', + '3-3 left word'); + +selection_test( + '<div contenteditable dir="ltr">ששש |נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">ששש נננ| בבב גגג קקק</div>', + '3-4 left word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נ|ננ בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">ששש נננ| בבב גגג קקק</div>', + '3-5 left word'); + +selection_test( + '<div contenteditable dir="ltr">ששש ננ|נ בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">ששש נננ| בבב גגג קקק</div>', + '3-6 left word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ| בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב| גגג קקק</div>', + '3-7 left word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ |בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב| גגג קקק</div>', + '3-8 left word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ ב|בב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב| גגג קקק</div>', + '3-9 left word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בב|ב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב| גגג קקק</div>', + '3-10 left word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב| גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב גגג| קקק</div>', + '3-11 left word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב |גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב גגג| קקק</div>', + '3-12 left word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב ג|גג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב גגג| קקק</div>', + '3-13 left word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב גג|ג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב גגג| קקק</div>', + '3-14 left word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב גגג| קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|ששש נננ בבב גגג קקק</div>', + '3-15 left word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב גגג |קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|ששש נננ בבב גגג קקק</div>', + '3-16 left word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב גגג ק|קק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|ששש נננ בבב גגג קקק</div>', + '3-17 left word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב גגג קק|ק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|ששש נננ בבב גגג קקק</div>', + '3-18 left word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב גגג קקק|</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">ששש| נננ בבב גגג קקק</div>', + '3-19 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_4.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_4.html new file mode 100644 index 0000000..3014b0577 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_4.html
@@ -0,0 +1,129 @@ +<!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">|ששש נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש |נננ בבב גגג קקק</div>', + '4-0 left word'); + +selection_test( + '<div contenteditable dir="rtl">ש|שש נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש |נננ בבב גגג קקק</div>', + '4-1 left word'); + +selection_test( + '<div contenteditable dir="rtl">שש|ש נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש |נננ בבב גגג קקק</div>', + '4-2 left word'); + +selection_test( + '<div contenteditable dir="rtl">ששש| נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש |נננ בבב גגג קקק</div>', + '4-3 left word'); + +selection_test( + '<div contenteditable dir="rtl">ששש |נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש נננ |בבב גגג קקק</div>', + '4-4 left word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נ|ננ בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש נננ |בבב גגג קקק</div>', + '4-5 left word'); + +selection_test( + '<div contenteditable dir="rtl">ששש ננ|נ בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש נננ |בבב גגג קקק</div>', + '4-6 left word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ| בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש נננ |בבב גגג קקק</div>', + '4-7 left word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ |בבב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב |גגג קקק</div>', + '4-8 left word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ ב|בב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב |גגג קקק</div>', + '4-9 left word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בב|ב גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב |גגג קקק</div>', + '4-10 left word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב| גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב |גגג קקק</div>', + '4-11 left word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב |גגג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב גגג |קקק</div>', + '4-12 left word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב ג|גג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב גגג |קקק</div>', + '4-13 left word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב גג|ג קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב גגג |קקק</div>', + '4-14 left word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב גגג| קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב גגג |קקק</div>', + '4-15 left word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב גגג |קקק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב גגג קקק|</div>', + '4-16 left word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב גגג ק|קק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב גגג קקק|</div>', + '4-17 left word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב גגג קק|ק</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב גגג קקק|</div>', + '4-18 left word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב גגג קקק|</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב גגג קקק|</div>', + '4-19 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_5.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_5.html new file mode 100644 index 0000000..c7dd6e7 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_5.html
@@ -0,0 +1,225 @@ +<!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 אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def hij אאא בבב צצצ opr uvw xyz</div>', + '5-0 left word'); + +selection_test( + '<div contenteditable dir="ltr">a|bc def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def hij אאא בבב צצצ opr uvw xyz</div>', + '5-1 left word'); + +selection_test( + '<div contenteditable dir="ltr">ab|c def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def hij אאא בבב צצצ opr uvw xyz</div>', + '5-2 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc| def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def hij אאא בבב צצצ opr uvw xyz</div>', + '5-3 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc |def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def hij אאא בבב צצצ opr uvw xyz</div>', + '5-4 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc d|ef hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def hij אאא בבב צצצ opr uvw xyz</div>', + '5-5 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc de|f hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def hij אאא בבב צצצ opr uvw xyz</div>', + '5-6 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def| hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def hij אאא בבב צצצ opr uvw xyz</div>', + '5-7 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def |hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def hij אאא בבב צצצ opr uvw xyz</div>', + '5-8 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def h|ij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |hij אאא בבב צצצ opr uvw xyz</div>', + '5-9 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hi|j אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |hij אאא בבב צצצ opr uvw xyz</div>', + '5-10 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij| אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |hij אאא בבב צצצ opr uvw xyz</div>', + '5-11 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |hij אאא בבב צצצ opr uvw xyz</div>', + '5-12 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij א|אא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא| בבב צצצ opr uvw xyz</div>', + '5-13 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אא|א בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא| בבב צצצ opr uvw xyz</div>', + '5-14 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא| בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב| צצצ opr uvw xyz</div>', + '5-15 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא |בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב| צצצ opr uvw xyz</div>', + '5-16 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא ב|בב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב| צצצ opr uvw xyz</div>', + '5-17 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בב|ב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב| צצצ opr uvw xyz</div>', + '5-18 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב| צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + '5-19 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב |צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + '5-20 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צ|צצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + '5-21 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצ|צ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + '5-22 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ| opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא| בבב צצצ opr uvw xyz</div>', + '5-23 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא| בבב צצצ opr uvw xyz</div>', + '5-24 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ o|pr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + '5-25 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ op|r uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + '5-26 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr| uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + '5-27 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr |uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + '5-28 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr u|vw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr |uvw xyz</div>', + '5-29 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uv|w xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr |uvw xyz</div>', + '5-30 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw| xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr |uvw xyz</div>', + '5-31 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw |xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr |uvw xyz</div>', + '5-32 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw x|yz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw |xyz</div>', + '5-33 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw xy|z</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw |xyz</div>', + '5-34 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw xyz|</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw |xyz</div>', + '5-35 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_6.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_6.html new file mode 100644 index 0000000..f20b3fb --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_6.html
@@ -0,0 +1,225 @@ +<!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">|abc def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def| hij אאא בבב צצצ opr uvw xyz</div>', + '6-0 left word'); + +selection_test( + '<div contenteditable dir="rtl">a|bc def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + '6-1 left word'); + +selection_test( + '<div contenteditable dir="rtl">ab|c def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + '6-2 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc| def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + '6-3 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc |def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc| def hij אאא בבב צצצ opr uvw xyz</div>', + '6-4 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc d|ef hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc| def hij אאא בבב צצצ opr uvw xyz</div>', + '6-5 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc de|f hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc| def hij אאא בבב צצצ opr uvw xyz</div>', + '6-6 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def| hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc| def hij אאא בבב צצצ opr uvw xyz</div>', + '6-7 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def |hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def| hij אאא בבב צצצ opr uvw xyz</div>', + '6-8 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def h|ij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def| hij אאא בבב צצצ opr uvw xyz</div>', + '6-9 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hi|j אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def| hij אאא בבב צצצ opr uvw xyz</div>', + '6-10 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij| אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + '6-11 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא |בבב צצצ opr uvw xyz</div>', + '6-12 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij א|אא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא |בבב צצצ opr uvw xyz</div>', + '6-13 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אא|א בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא |בבב צצצ opr uvw xyz</div>', + '6-14 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא| בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא |בבב צצצ opr uvw xyz</div>', + '6-15 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא |בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב |צצצ opr uvw xyz</div>', + '6-16 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא ב|בב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב |צצצ opr uvw xyz</div>', + '6-17 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בב|ב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב |צצצ opr uvw xyz</div>', + '6-18 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב| צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב |צצצ opr uvw xyz</div>', + '6-19 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב |צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + '6-20 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צ|צצ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + '6-21 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצ|צ opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + '6-22 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ| opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + '6-23 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw| xyz</div>', + '6-24 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ o|pr uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw xyz|</div>', + '6-25 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ op|r uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw xyz|</div>', + '6-26 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr| uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw xyz|</div>', + '6-27 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr |uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr| uvw xyz</div>', + '6-28 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr u|vw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr| uvw xyz</div>', + '6-29 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uv|w xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr| uvw xyz</div>', + '6-30 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw| xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr| uvw xyz</div>', + '6-31 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw |xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw| xyz</div>', + '6-32 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw x|yz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw| xyz</div>', + '6-33 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw xy|z</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw| xyz</div>', + '6-34 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw xyz|</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw xyz|</div>', + '6-35 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_7.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_7.html new file mode 100644 index 0000000..16e480a9 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_7.html
@@ -0,0 +1,153 @@ +<!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 שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def שנב סטז uvw xyz</div>', + '7-0 left word'); + +selection_test( + '<div contenteditable dir="ltr">a|bc def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def שנב סטז uvw xyz</div>', + '7-1 left word'); + +selection_test( + '<div contenteditable dir="ltr">ab|c def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def שנב סטז uvw xyz</div>', + '7-2 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc| def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def שנב סטז uvw xyz</div>', + '7-3 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc |def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|abc def שנב סטז uvw xyz</div>', + '7-4 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc d|ef שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def שנב סטז uvw xyz</div>', + '7-5 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc de|f שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def שנב סטז uvw xyz</div>', + '7-6 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def| שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def שנב סטז uvw xyz</div>', + '7-7 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def |שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc |def שנב סטז uvw xyz</div>', + '7-8 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def ש|נב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def שנב| סטז uvw xyz</div>', + '7-9 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנ|ב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def שנב| סטז uvw xyz</div>', + '7-10 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב| סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |שנב סטז uvw xyz</div>', + '7-11 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב |סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |שנב סטז uvw xyz</div>', + '7-12 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב ס|טז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |שנב סטז uvw xyz</div>', + '7-13 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סט|ז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def |שנב סטז uvw xyz</div>', + '7-14 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז| uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def שנב| סטז uvw xyz</div>', + '7-15 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז |uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def שנב| סטז uvw xyz</div>', + '7-16 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז u|vw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז |uvw xyz</div>', + '7-17 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז uv|w xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז |uvw xyz</div>', + '7-18 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז uvw| xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז |uvw xyz</div>', + '7-19 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז uvw |xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז |uvw xyz</div>', + '7-20 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז uvw x|yz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז uvw |xyz</div>', + '7-21 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז uvw xy|z</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז uvw |xyz</div>', + '7-22 left word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז uvw xyz|</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז uvw |xyz</div>', + '7-23 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_8.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_8.html new file mode 100644 index 0000000..b92a5a0 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_8.html
@@ -0,0 +1,153 @@ +<!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">|abc def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc| def שנב סטז uvw xyz</div>', + '8-0 left word'); + +selection_test( + '<div contenteditable dir="rtl">a|bc def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def |שנב סטז uvw xyz</div>', + '8-1 left word'); + +selection_test( + '<div contenteditable dir="rtl">ab|c def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def |שנב סטז uvw xyz</div>', + '8-2 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc| def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def |שנב סטז uvw xyz</div>', + '8-3 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc |def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc| def שנב סטז uvw xyz</div>', + '8-4 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc d|ef שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc| def שנב סטז uvw xyz</div>', + '8-5 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc de|f שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc| def שנב סטז uvw xyz</div>', + '8-6 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def| שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def |שנב סטז uvw xyz</div>', + '8-7 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def |שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def שנב |סטז uvw xyz</div>', + '8-8 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def ש|נב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def שנב |סטז uvw xyz</div>', + '8-9 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנ|ב סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def שנב |סטז uvw xyz</div>', + '8-10 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב| סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def שנב |סטז uvw xyz</div>', + '8-11 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב |סטז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז |uvw xyz</div>', + '8-12 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב ס|טז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז |uvw xyz</div>', + '8-13 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סט|ז uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז |uvw xyz</div>', + '8-14 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז| uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז |uvw xyz</div>', + '8-15 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז |uvw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז uvw| xyz</div>', + '8-16 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז u|vw xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז uvw xyz|</div>', + '8-17 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז uv|w xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז uvw xyz|</div>', + '8-18 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז uvw| xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז uvw xyz|</div>', + '8-19 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז uvw |xyz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז uvw| xyz</div>', + '8-20 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז uvw x|yz</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז uvw| xyz</div>', + '8-21 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז uvw xy|z</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז uvw| xyz</div>', + '8-22 left word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז uvw xyz|</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז uvw xyz|</div>', + '8-23 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_9.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_9.html new file mode 100644 index 0000000..908d326 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_9.html
@@ -0,0 +1,81 @@ +<!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">|aaa אאא bbb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|aaa אאא bbb</div>', + '9-0 left word'); + +selection_test( + '<div contenteditable dir="ltr">a|aa אאא bbb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|aaa אאא bbb</div>', + '9-1 left word'); + +selection_test( + '<div contenteditable dir="ltr">aa|a אאא bbb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|aaa אאא bbb</div>', + '9-2 left word'); + +selection_test( + '<div contenteditable dir="ltr">aaa| אאא bbb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|aaa אאא bbb</div>', + '9-3 left word'); + +selection_test( + '<div contenteditable dir="ltr">aaa |אאא bbb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">|aaa אאא bbb</div>', + '9-4 left word'); + +selection_test( + '<div contenteditable dir="ltr">aaa א|אא bbb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">aaa |אאא bbb</div>', + '9-5 left word'); + +selection_test( + '<div contenteditable dir="ltr">aaa אא|א bbb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">aaa |אאא bbb</div>', + '9-6 left word'); + +selection_test( + '<div contenteditable dir="ltr">aaa אאא| bbb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">aaa |אאא bbb</div>', + '9-7 left word'); + +selection_test( + '<div contenteditable dir="ltr">aaa אאא |bbb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">aaa |אאא bbb</div>', + '9-8 left word'); + +selection_test( + '<div contenteditable dir="ltr">aaa אאא b|bb</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">aaa אאא |bbb</div>', + '9-9 left word'); + +selection_test( + '<div contenteditable dir="ltr">aaa אאא bb|b</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">aaa אאא |bbb</div>', + '9-10 left word'); + +selection_test( + '<div contenteditable dir="ltr">aaa אאא bbb|</div>', + selection => selection.modify('move', 'left', 'word'), + '<div contenteditable dir="ltr">aaa אאא |bbb</div>', + '9-11 left word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_1.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_1.html new file mode 100644 index 0000000..f1275f4 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_1.html
@@ -0,0 +1,129 @@ +<!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 opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc |def hij opq rst</div>', + '1-0 right word'); + +selection_test( + '<div contenteditable dir="ltr">a|bc def hij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc |def hij opq rst</div>', + '1-1 right word'); + +selection_test( + '<div contenteditable dir="ltr">ab|c def hij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc |def hij opq rst</div>', + '1-2 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc| def hij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc |def hij opq rst</div>', + '1-3 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc |def hij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def |hij opq rst</div>', + '1-4 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc d|ef hij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def |hij opq rst</div>', + '1-5 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc de|f hij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def |hij opq rst</div>', + '1-6 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def| hij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def |hij opq rst</div>', + '1-7 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def |hij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij |opq rst</div>', + '1-8 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def h|ij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij |opq rst</div>', + '1-9 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hi|j opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij |opq rst</div>', + '1-10 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij| opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij |opq rst</div>', + '1-11 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij |opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij opq |rst</div>', + '1-12 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij o|pq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij opq |rst</div>', + '1-13 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij op|q rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij opq |rst</div>', + '1-14 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij opq| rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij opq |rst</div>', + '1-15 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij opq |rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij opq rst|</div>', + '1-16 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij opq r|st</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij opq rst|</div>', + '1-17 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij opq rs|t</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij opq rst|</div>', + '1-18 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij opq rst|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij opq rst|</div>', + '1-19 right word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_10.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_10.html new file mode 100644 index 0000000..27c6ef7 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_10.html
@@ -0,0 +1,81 @@ +<!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</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|aaa אאא bbb</div>', + '10-0 right word'); + +selection_test( + '<div contenteditable dir="rtl">a|aa אאא bbb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|aaa אאא bbb</div>', + '10-1 right word'); + +selection_test( + '<div contenteditable dir="rtl">aa|a אאא bbb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|aaa אאא bbb</div>', + '10-2 right word'); + +selection_test( + '<div contenteditable dir="rtl">aaa| אאא bbb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|aaa אאא bbb</div>', + '10-3 right word'); + +selection_test( + '<div contenteditable dir="rtl">aaa |אאא bbb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|aaa אאא bbb</div>', + '10-4 right word'); + +selection_test( + '<div contenteditable dir="rtl">aaa א|אא bbb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">aaa |אאא bbb</div>', + '10-5 right word'); + +selection_test( + '<div contenteditable dir="rtl">aaa אא|א bbb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">aaa |אאא bbb</div>', + '10-6 right word'); + +selection_test( + '<div contenteditable dir="rtl">aaa אאא| bbb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">aaa |אאא bbb</div>', + '10-7 right word'); + +selection_test( + '<div contenteditable dir="rtl">aaa אאא |bbb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">aaa |אאא bbb</div>', + '10-8 right word'); + +selection_test( + '<div contenteditable dir="rtl">aaa אאא b|bb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">aaa אאא |bbb</div>', + '10-9 right word'); + +selection_test( + '<div contenteditable dir="rtl">aaa אאא bb|b</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">aaa אאא |bbb</div>', + '10-10 right word'); + +selection_test( + '<div contenteditable dir="rtl">aaa אאא bbb|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">aaa אאא |bbb</div>', + '10-11 right word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_11.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_11.html new file mode 100644 index 0000000..fe8572c --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_11.html
@@ -0,0 +1,225 @@ +<!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">|אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב| צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-0 right word'); + +selection_test( + '<div contenteditable dir="ltr">א|אא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>', + '11-1 right word'); + +selection_test( + '<div contenteditable dir="ltr">אא|א בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>', + '11-2 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא| בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>', + '11-3 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא |בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא| בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-4 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא ב|בב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא| בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-5 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בב|ב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא| בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-6 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב| צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא| בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-7 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב |צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב| צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-8 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צ|צצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב| צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-9 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצ|צ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב| צצצ aaa bbb ccc דדד עעע פפפ</div>', + '11-10 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ| aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>', + '11-11 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa |bbb ccc דדד עעע פפפ</div>', + '11-12 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ a|aa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa |bbb ccc דדד עעע פפפ</div>', + '11-13 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aa|a bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa |bbb ccc דדד עעע פפפ</div>', + '11-14 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa| bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa |bbb ccc דדד עעע פפפ</div>', + '11-15 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa |bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb |ccc דדד עעע פפפ</div>', + '11-16 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa b|bb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb |ccc דדד עעע פפפ</div>', + '11-17 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bb|b ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb |ccc דדד עעע פפפ</div>', + '11-18 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb| ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb |ccc דדד עעע פפפ</div>', + '11-19 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb |ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</div>', + '11-20 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb c|cc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</div>', + '11-21 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb cc|c דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</div>', + '11-22 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc| דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</div>', + '11-23 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע| פפפ</div>', + '11-24 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc ד|דד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע פפפ|</div>', + '11-25 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דד|ד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע פפפ|</div>', + '11-26 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד| עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע פפפ|</div>', + '11-27 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד |עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד| עעע פפפ</div>', + '11-28 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד ע|עע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד| עעע פפפ</div>', + '11-29 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עע|ע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד| עעע פפפ</div>', + '11-30 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע| פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד| עעע פפפ</div>', + '11-31 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע |פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע| פפפ</div>', + '11-32 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע פ|פפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע| פפפ</div>', + '11-33 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע פפ|פ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע| פפפ</div>', + '11-34 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע פפפ|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע פפפ|</div>', + '11-35 right word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_12.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_12.html new file mode 100644 index 0000000..65c3f750 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_12.html
@@ -0,0 +1,225 @@ +<!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', 'right', 'word'), + '<div contenteditable dir="rtl">|אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '12-0 right word'); + +selection_test( + '<div contenteditable dir="rtl">א|אא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '12-1 right word'); + +selection_test( + '<div contenteditable dir="rtl">אא|א בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '12-2 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא| בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '12-3 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא |בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '12-4 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא ב|בב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא |בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '12-5 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בב|ב צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא |בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '12-6 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב| צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא |בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '12-7 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב |צצצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא |בבב צצצ aaa bbb ccc דדד עעע פפפ</div>', + '12-8 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צ|צצ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב |צצצ aaa bbb ccc דדד עעע פפפ</div>', + '12-9 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצ|צ aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב |צצצ aaa bbb ccc דדד עעע פפפ</div>', + '12-10 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ| aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב |צצצ aaa bbb ccc דדד עעע פפפ</div>', + '12-11 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב |צצצ aaa bbb ccc דדד עעע פפפ</div>', + '12-12 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ a|aa bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa| bbb ccc דדד עעע פפפ</div>', + '12-13 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aa|a bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa| bbb ccc דדד עעע פפפ</div>', + '12-14 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa| bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb| ccc דדד עעע פפפ</div>', + '12-15 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa |bbb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb| ccc דדד עעע פפפ</div>', + '12-16 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa b|bb ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb| ccc דדד עעע פפפ</div>', + '12-17 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bb|b ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb| ccc דדד עעע פפפ</div>', + '12-18 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb| ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>', + '12-19 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb |ccc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>', + '12-20 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb c|cc דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>', + '12-21 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb cc|c דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ |aaa bbb ccc דדד עעע פפפ</div>', + '12-22 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc| דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa| bbb ccc דדד עעע פפפ</div>', + '12-23 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa| bbb ccc דדד עעע פפפ</div>', + '12-24 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc ד|דד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</div>', + '12-25 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דד|ד עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</div>', + '12-26 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד| עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</div>', + '12-27 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד |עעע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc |דדד עעע פפפ</div>', + '12-28 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד ע|עע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד |עעע פפפ</div>', + '12-29 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עע|ע פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד |עעע פפפ</div>', + '12-30 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע| פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד |עעע פפפ</div>', + '12-31 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע |פפפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד |עעע פפפ</div>', + '12-32 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע פ|פפ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע |פפפ</div>', + '12-33 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע פפ|פ</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע |פפפ</div>', + '12-34 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע פפפ|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע |פפפ</div>', + '12-35 right word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_13.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_13.html new file mode 100644 index 0000000..e6f817e --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_13.html
@@ -0,0 +1,153 @@ +<!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">|אאא בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא| בבב aaa bbb צצצ דדד</div>', + '13-0 right word'); + +selection_test( + '<div contenteditable dir="ltr">א|אא בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב |aaa bbb צצצ דדד</div>', + '13-1 right word'); + +selection_test( + '<div contenteditable dir="ltr">אא|א בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב |aaa bbb צצצ דדד</div>', + '13-2 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא| בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב |aaa bbb צצצ דדד</div>', + '13-3 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא |בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא| בבב aaa bbb צצצ דדד</div>', + '13-4 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא ב|בב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא| בבב aaa bbb צצצ דדד</div>', + '13-5 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בב|ב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא| בבב aaa bbb צצצ דדד</div>', + '13-6 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב| aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב |aaa bbb צצצ דדד</div>', + '13-7 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב |aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa |bbb צצצ דדד</div>', + '13-8 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב a|aa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa |bbb צצצ דדד</div>', + '13-9 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aa|a bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa |bbb צצצ דדד</div>', + '13-10 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa| bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa |bbb צצצ דדד</div>', + '13-11 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa |bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb |צצצ דדד</div>', + '13-12 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa b|bb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb |צצצ דדד</div>', + '13-13 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bb|b צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb |צצצ דדד</div>', + '13-14 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb| צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb |צצצ דדד</div>', + '13-15 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb |צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ| דדד</div>', + '13-16 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb צ|צצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ דדד|</div>', + '13-17 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצ|צ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ דדד|</div>', + '13-18 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ| דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ דדד|</div>', + '13-19 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ |דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ| דדד</div>', + '13-20 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ ד|דד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ| דדד</div>', + '13-21 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ דד|ד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ| דדד</div>', + '13-22 right word'); + +selection_test( + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ דדד|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ דדד|</div>', + '13-23 right word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_14.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_14.html new file mode 100644 index 0000000..eb351cc --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_14.html
@@ -0,0 +1,153 @@ +<!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 צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|אאא בבב aaa bbb צצצ דדד</div>', + '14-0 right word'); + +selection_test( + '<div contenteditable dir="rtl">א|אא בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|אאא בבב aaa bbb צצצ דדד</div>', + '14-1 right word'); + +selection_test( + '<div contenteditable dir="rtl">אא|א בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|אאא בבב aaa bbb צצצ דדד</div>', + '14-2 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא| בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|אאא בבב aaa bbb צצצ דדד</div>', + '14-3 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא |בבב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|אאא בבב aaa bbb צצצ דדד</div>', + '14-4 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא ב|בב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא |בבב aaa bbb צצצ דדד</div>', + '14-5 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בב|ב aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא |בבב aaa bbb צצצ דדד</div>', + '14-6 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב| aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא |בבב aaa bbb צצצ דדד</div>', + '14-7 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב |aaa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא |בבב aaa bbb צצצ דדד</div>', + '14-8 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב a|aa bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa| bbb צצצ דדד</div>', + '14-9 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aa|a bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa| bbb צצצ דדד</div>', + '14-10 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa| bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב |aaa bbb צצצ דדד</div>', + '14-11 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa |bbb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב |aaa bbb צצצ דדד</div>', + '14-12 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa b|bb צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב |aaa bbb צצצ דדד</div>', + '14-13 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bb|b צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב |aaa bbb צצצ דדד</div>', + '14-14 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb| צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa| bbb צצצ דדד</div>', + '14-15 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb |צצצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa| bbb צצצ דדד</div>', + '14-16 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb צ|צצ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb |צצצ דדד</div>', + '14-17 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצ|צ דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb |צצצ דדד</div>', + '14-18 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ| דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb |צצצ דדד</div>', + '14-19 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ |דדד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb |צצצ דדד</div>', + '14-20 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ ד|דד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ |דדד</div>', + '14-21 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ דד|ד</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ |דדד</div>', + '14-22 right word'); + +selection_test( + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ דדד|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ |דדד</div>', + '14-23 right word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_15.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_15.html new file mode 100644 index 0000000..c863298 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_15.html
@@ -0,0 +1,81 @@ +<!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 סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">שנב |abc סטז</div>', + '15-0 right word'); + +selection_test( + '<div contenteditable dir="ltr">ש|נב abc סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">שנב |abc סטז</div>', + '15-1 right word'); + +selection_test( + '<div contenteditable dir="ltr">שנ|ב abc סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">שנב |abc סטז</div>', + '15-2 right word'); + +selection_test( + '<div contenteditable dir="ltr">שנב| abc סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">שנב |abc סטז</div>', + '15-3 right word'); + +selection_test( + '<div contenteditable dir="ltr">שנב |abc סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">שנב abc |סטז</div>', + '15-4 right word'); + +selection_test( + '<div contenteditable dir="ltr">שנב a|bc סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">שנב abc |סטז</div>', + '15-5 right word'); + +selection_test( + '<div contenteditable dir="ltr">שנב ab|c סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">שנב abc |סטז</div>', + '15-6 right word'); + +selection_test( + '<div contenteditable dir="ltr">שנב abc| סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">שנב abc |סטז</div>', + '15-7 right word'); + +selection_test( + '<div contenteditable dir="ltr">שנב abc |סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">שנב abc סטז|</div>', + '15-8 right word'); + +selection_test( + '<div contenteditable dir="ltr">שנב abc ס|טז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">שנב abc סטז|</div>', + '15-9 right word'); + +selection_test( + '<div contenteditable dir="ltr">שנב abc סט|ז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">שנב abc סטז|</div>', + '15-10 right word'); + +selection_test( + '<div contenteditable dir="ltr">שנב abc סטז|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">שנב abc סטז|</div>', + '15-11 right word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_16.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_16.html new file mode 100644 index 0000000..4ddbba0 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_16.html
@@ -0,0 +1,81 @@ +<!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">|שנב abc סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|שנב abc סטז</div>', + '16-0 right word'); + +selection_test( + '<div contenteditable dir="rtl">ש|נב abc סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|שנב abc סטז</div>', + '16-1 right word'); + +selection_test( + '<div contenteditable dir="rtl">שנ|ב abc סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|שנב abc סטז</div>', + '16-2 right word'); + +selection_test( + '<div contenteditable dir="rtl">שנב| abc סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|שנב abc סטז</div>', + '16-3 right word'); + +selection_test( + '<div contenteditable dir="rtl">שנב |abc סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|שנב abc סטז</div>', + '16-4 right word'); + +selection_test( + '<div contenteditable dir="rtl">שנב a|bc סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">שנב |abc סטז</div>', + '16-5 right word'); + +selection_test( + '<div contenteditable dir="rtl">שנב ab|c סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">שנב |abc סטז</div>', + '16-6 right word'); + +selection_test( + '<div contenteditable dir="rtl">שנב abc| סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">שנב |abc סטז</div>', + '16-7 right word'); + +selection_test( + '<div contenteditable dir="rtl">שנב abc |סטז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">שנב |abc סטז</div>', + '16-8 right word'); + +selection_test( + '<div contenteditable dir="rtl">שנב abc ס|טז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">שנב abc |סטז</div>', + '16-9 right word'); + +selection_test( + '<div contenteditable dir="rtl">שנב abc סט|ז</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">שנב abc |סטז</div>', + '16-10 right word'); + +selection_test( + '<div contenteditable dir="rtl">שנב abc סטז|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">שנב abc |סטז</div>', + '16-11 right word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_17.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_17.html new file mode 100644 index 0000000..119d7b4 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_17.html
@@ -0,0 +1,117 @@ +<!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 \u202Bבאד def\u202C xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד| def\u202C xyz</div>', + '17-0 right word'); + +selection_test( + '<div contenteditable dir="ltr">a|bc \u202Bבאד def\u202C xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד| def\u202C xyz</div>', + '17-1 right word'); + +selection_test( + '<div contenteditable dir="ltr">ab|c \u202Bבאד def\u202C xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד| def\u202C xyz</div>', + '17-2 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc| \u202Bבאד def\u202C xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד| def\u202C xyz</div>', + '17-3 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc |\u202Bבאד def\u202C xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד| def\u202C xyz</div>', + '17-4 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202B|באד def\u202C xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C |xyz</div>', + '17-5 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bב|אד def\u202C xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C |xyz</div>', + '17-6 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבא|ד def\u202C xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C |xyz</div>', + '17-7 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד| def\u202C xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C |xyz</div>', + '17-8 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד |def\u202C xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד| def\u202C xyz</div>', + '17-9 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד d|ef\u202C xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד| def\u202C xyz</div>', + '17-10 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד de|f\u202C xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד| def\u202C xyz</div>', + '17-11 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד def|\u202C xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C |xyz</div>', + '17-12 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C| xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C |xyz</div>', + '17-13 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C |xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C xyz|</div>', + '17-14 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C x|yz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C xyz|</div>', + '17-15 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C xy|z</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C xyz|</div>', + '17-16 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C xyz|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C xyz|</div>', + '17-17 right word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_18.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_18.html new file mode 100644 index 0000000..a0cafd7 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_18.html
@@ -0,0 +1,147 @@ +<!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> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_19.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_19.html new file mode 100644 index 0000000..507e269 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_19.html
@@ -0,0 +1,237 @@ +<!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 this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc |def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-0 right word'); + +selection_test( + '<div contenteditable dir="ltr">a|bc def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc |def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-1 right word'); + +selection_test( + '<div contenteditable dir="ltr">ab|c def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc |def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-2 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc| def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc |def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-3 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc |def this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-4 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc d|ef this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-5 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc de|f this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-6 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def| this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + '19-7 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-8 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def t|his<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-9 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def th|is<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-10 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def thi|s<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-11 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this|<span>is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-12 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>|is</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-13 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>i|s</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-14 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is|</span><span>one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-15 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>|one</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-16 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>o|ne</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-17 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>on|e</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-18 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one|</span><span>word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-19 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>|word</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-20 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>w|ord</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-21 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>wo|rd</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-22 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>wor|d</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-23 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word|</span>end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-24 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>|end opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-25 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>e|nd opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-26 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>en|d opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-27 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end| opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + '19-28 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq |rst </div>', + '19-29 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end o|pq rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq |rst </div>', + '19-30 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end op|q rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq |rst </div>', + '19-31 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq| rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq |rst </div>', + '19-32 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq |rst </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq rst| </div>', + '19-33 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq r|st </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq rst| </div>', + '19-34 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq rs|t </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq rst| </div>', + '19-35 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq rst| </div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq rst| </div>', + '19-36 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq rst |</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq rst| </div>', + '19-37 right word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_2.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_2.html new file mode 100644 index 0000000..af054945 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_2.html
@@ -0,0 +1,129 @@ +<!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">|abc def hij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|abc def hij opq rst</div>', + '2-0 right word'); + +selection_test( + '<div contenteditable dir="rtl">a|bc def hij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc| def hij opq rst</div>', + '2-1 right word'); + +selection_test( + '<div contenteditable dir="rtl">ab|c def hij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc| def hij opq rst</div>', + '2-2 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc| def hij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def| hij opq rst</div>', + '2-3 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc |def hij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def| hij opq rst</div>', + '2-4 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc d|ef hij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def| hij opq rst</div>', + '2-5 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc de|f hij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def| hij opq rst</div>', + '2-6 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def| hij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij| opq rst</div>', + '2-7 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def |hij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij| opq rst</div>', + '2-8 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def h|ij opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij| opq rst</div>', + '2-9 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hi|j opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij| opq rst</div>', + '2-10 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij| opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij opq| rst</div>', + '2-11 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij |opq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij opq| rst</div>', + '2-12 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij o|pq rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij opq| rst</div>', + '2-13 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij op|q rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij opq| rst</div>', + '2-14 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij opq| rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|abc def hij opq rst</div>', + '2-15 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij opq |rst</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|abc def hij opq rst</div>', + '2-16 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij opq r|st</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|abc def hij opq rst</div>', + '2-17 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij opq rs|t</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|abc def hij opq rst</div>', + '2-18 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij opq rst|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc| def hij opq rst</div>', + '2-19 right word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_20.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_20.html new file mode 100644 index 0000000..1b56645 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_20.html
@@ -0,0 +1,14 @@ +<!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">|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">|</div>', + '20-0 right word'); +</script>
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_3.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_3.html new file mode 100644 index 0000000..2ffa8fa6 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_3.html
@@ -0,0 +1,129 @@ +<!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">|ששש נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב גגג| קקק</div>', + '3-0 right word'); + +selection_test( + '<div contenteditable dir="ltr">ש|שש נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב גגג קקק|</div>', + '3-1 right word'); + +selection_test( + '<div contenteditable dir="ltr">שש|ש נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב גגג קקק|</div>', + '3-2 right word'); + +selection_test( + '<div contenteditable dir="ltr">ששש| נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב גגג קקק|</div>', + '3-3 right word'); + +selection_test( + '<div contenteditable dir="ltr">ששש |נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש| נננ בבב גגג קקק</div>', + '3-4 right word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נ|ננ בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש| נננ בבב גגג קקק</div>', + '3-5 right word'); + +selection_test( + '<div contenteditable dir="ltr">ששש ננ|נ בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש| נננ בבב גגג קקק</div>', + '3-6 right word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ| בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש| נננ בבב גגג קקק</div>', + '3-7 right word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ |בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש נננ| בבב גגג קקק</div>', + '3-8 right word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ ב|בב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש נננ| בבב גגג קקק</div>', + '3-9 right word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בב|ב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש נננ| בבב גגג קקק</div>', + '3-10 right word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב| גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש נננ| בבב גגג קקק</div>', + '3-11 right word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב |גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב| גגג קקק</div>', + '3-12 right word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב ג|גג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב| גגג קקק</div>', + '3-13 right word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב גג|ג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב| גגג קקק</div>', + '3-14 right word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב גגג| קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב| גגג קקק</div>', + '3-15 right word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב גגג |קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב גגג| קקק</div>', + '3-16 right word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב גגג ק|קק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב גגג| קקק</div>', + '3-17 right word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב גגג קק|ק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב גגג| קקק</div>', + '3-18 right word'); + +selection_test( + '<div contenteditable dir="ltr">ששש נננ בבב גגג קקק|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">ששש נננ בבב גגג קקק|</div>', + '3-19 right word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_4.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_4.html new file mode 100644 index 0000000..7a9595e --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_4.html
@@ -0,0 +1,129 @@ +<!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">|ששש נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|ששש נננ בבב גגג קקק</div>', + '4-0 right word'); + +selection_test( + '<div contenteditable dir="rtl">ש|שש נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|ששש נננ בבב גגג קקק</div>', + '4-1 right word'); + +selection_test( + '<div contenteditable dir="rtl">שש|ש נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|ששש נננ בבב גגג קקק</div>', + '4-2 right word'); + +selection_test( + '<div contenteditable dir="rtl">ששש| נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|ששש נננ בבב גגג קקק</div>', + '4-3 right word'); + +selection_test( + '<div contenteditable dir="rtl">ששש |נננ בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|ששש נננ בבב גגג קקק</div>', + '4-4 right word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נ|ננ בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">ששש |נננ בבב גגג קקק</div>', + '4-5 right word'); + +selection_test( + '<div contenteditable dir="rtl">ששש ננ|נ בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">ששש |נננ בבב גגג קקק</div>', + '4-6 right word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ| בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">ששש |נננ בבב גגג קקק</div>', + '4-7 right word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ |בבב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">ששש |נננ בבב גגג קקק</div>', + '4-8 right word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ ב|בב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">ששש נננ |בבב גגג קקק</div>', + '4-9 right word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בב|ב גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">ששש נננ |בבב גגג קקק</div>', + '4-10 right word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב| גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">ששש נננ |בבב גגג קקק</div>', + '4-11 right word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב |גגג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">ששש נננ |בבב גגג קקק</div>', + '4-12 right word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב ג|גג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב |גגג קקק</div>', + '4-13 right word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב גג|ג קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב |גגג קקק</div>', + '4-14 right word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב גגג| קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב |גגג קקק</div>', + '4-15 right word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב גגג |קקק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב |גגג קקק</div>', + '4-16 right word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב גגג ק|קק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב גגג |קקק</div>', + '4-17 right word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב גגג קק|ק</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב גגג |קקק</div>', + '4-18 right word'); + +selection_test( + '<div contenteditable dir="rtl">ששש נננ בבב גגג קקק|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">ששש נננ בבב גגג |קקק</div>', + '4-19 right word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_5.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_5.html new file mode 100644 index 0000000..ffa6f64 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_5.html
@@ -0,0 +1,225 @@ +<!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 אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc |def hij אאא בבב צצצ opr uvw xyz</div>', + '5-0 right word'); + +selection_test( + '<div contenteditable dir="ltr">a|bc def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc |def hij אאא בבב צצצ opr uvw xyz</div>', + '5-1 right word'); + +selection_test( + '<div contenteditable dir="ltr">ab|c def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc |def hij אאא בבב צצצ opr uvw xyz</div>', + '5-2 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc| def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc |def hij אאא בבב צצצ opr uvw xyz</div>', + '5-3 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc |def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def |hij אאא בבב צצצ opr uvw xyz</div>', + '5-4 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc d|ef hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def |hij אאא בבב צצצ opr uvw xyz</div>', + '5-5 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc de|f hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def |hij אאא בבב צצצ opr uvw xyz</div>', + '5-6 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def| hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def |hij אאא בבב צצצ opr uvw xyz</div>', + '5-7 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def |hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + '5-8 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def h|ij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + '5-9 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hi|j אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + '5-10 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij| אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + '5-11 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב| צצצ opr uvw xyz</div>', + '5-12 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij א|אא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + '5-13 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אא|א בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + '5-14 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא| בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + '5-15 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא |בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא| בבב צצצ opr uvw xyz</div>', + '5-16 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא ב|בב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא| בבב צצצ opr uvw xyz</div>', + '5-17 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בב|ב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא| בבב צצצ opr uvw xyz</div>', + '5-18 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב| צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא| בבב צצצ opr uvw xyz</div>', + '5-19 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב |צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב| צצצ opr uvw xyz</div>', + '5-20 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צ|צצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב| צצצ opr uvw xyz</div>', + '5-21 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצ|צ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב| צצצ opr uvw xyz</div>', + '5-22 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ| opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + '5-23 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr |uvw xyz</div>', + '5-24 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ o|pr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr |uvw xyz</div>', + '5-25 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ op|r uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr |uvw xyz</div>', + '5-26 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr| uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr |uvw xyz</div>', + '5-27 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr |uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw |xyz</div>', + '5-28 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr u|vw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw |xyz</div>', + '5-29 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uv|w xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw |xyz</div>', + '5-30 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw| xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw |xyz</div>', + '5-31 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw |xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw xyz|</div>', + '5-32 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw x|yz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw xyz|</div>', + '5-33 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw xy|z</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw xyz|</div>', + '5-34 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw xyz|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw xyz|</div>', + '5-35 right word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_6.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_6.html new file mode 100644 index 0000000..ca0980f --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_6.html
@@ -0,0 +1,225 @@ +<!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">|abc def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|abc def hij אאא בבב צצצ opr uvw xyz</div>', + '6-0 right word'); + +selection_test( + '<div contenteditable dir="rtl">a|bc def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc| def hij אאא בבב צצצ opr uvw xyz</div>', + '6-1 right word'); + +selection_test( + '<div contenteditable dir="rtl">ab|c def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc| def hij אאא בבב צצצ opr uvw xyz</div>', + '6-2 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc| def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def| hij אאא בבב צצצ opr uvw xyz</div>', + '6-3 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc |def hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def| hij אאא בבב צצצ opr uvw xyz</div>', + '6-4 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc d|ef hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def| hij אאא בבב צצצ opr uvw xyz</div>', + '6-5 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc de|f hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def| hij אאא בבב צצצ opr uvw xyz</div>', + '6-6 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def| hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|abc def hij אאא בבב צצצ opr uvw xyz</div>', + '6-7 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def |hij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|abc def hij אאא בבב צצצ opr uvw xyz</div>', + '6-8 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def h|ij אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|abc def hij אאא בבב צצצ opr uvw xyz</div>', + '6-9 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hi|j אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|abc def hij אאא בבב צצצ opr uvw xyz</div>', + '6-10 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij| אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc| def hij אאא בבב צצצ opr uvw xyz</div>', + '6-11 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc| def hij אאא בבב צצצ opr uvw xyz</div>', + '6-12 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij א|אא בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + '6-13 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אא|א בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + '6-14 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא| בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + '6-15 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא |בבב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij |אאא בבב צצצ opr uvw xyz</div>', + '6-16 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא ב|בב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא |בבב צצצ opr uvw xyz</div>', + '6-17 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בב|ב צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא |בבב צצצ opr uvw xyz</div>', + '6-18 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב| צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא |בבב צצצ opr uvw xyz</div>', + '6-19 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב |צצצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא |בבב צצצ opr uvw xyz</div>', + '6-20 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צ|צצ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב |צצצ opr uvw xyz</div>', + '6-21 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצ|צ opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב |צצצ opr uvw xyz</div>', + '6-22 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ| opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב |צצצ opr uvw xyz</div>', + '6-23 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב |צצצ opr uvw xyz</div>', + '6-24 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ o|pr uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr| uvw xyz</div>', + '6-25 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ op|r uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr| uvw xyz</div>', + '6-26 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr| uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw| xyz</div>', + '6-27 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr |uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw| xyz</div>', + '6-28 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr u|vw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw| xyz</div>', + '6-29 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uv|w xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw| xyz</div>', + '6-30 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw| xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + '6-31 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw |xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + '6-32 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw x|yz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + '6-33 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw xy|z</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ |opr uvw xyz</div>', + '6-34 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw xyz|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr| uvw xyz</div>', + '6-35 right word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_7.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_7.html new file mode 100644 index 0000000..d3a0bf7 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_7.html
@@ -0,0 +1,153 @@ +<!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 שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc |def שנב סטז uvw xyz</div>', + '7-0 right word'); + +selection_test( + '<div contenteditable dir="ltr">a|bc def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc |def שנב סטז uvw xyz</div>', + '7-1 right word'); + +selection_test( + '<div contenteditable dir="ltr">ab|c def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc |def שנב סטז uvw xyz</div>', + '7-2 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc| def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc |def שנב סטז uvw xyz</div>', + '7-3 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc |def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def |שנב סטז uvw xyz</div>', + '7-4 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc d|ef שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def |שנב סטז uvw xyz</div>', + '7-5 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc de|f שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def |שנב סטז uvw xyz</div>', + '7-6 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def| שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def |שנב סטז uvw xyz</div>', + '7-7 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def |שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def שנב| סטז uvw xyz</div>', + '7-8 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def ש|נב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז |uvw xyz</div>', + '7-9 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנ|ב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז |uvw xyz</div>', + '7-10 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב| סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז |uvw xyz</div>', + '7-11 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב |סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def שנב| סטז uvw xyz</div>', + '7-12 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב ס|טז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def שנב| סטז uvw xyz</div>', + '7-13 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סט|ז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def שנב| סטז uvw xyz</div>', + '7-14 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז| uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז |uvw xyz</div>', + '7-15 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז |uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז uvw |xyz</div>', + '7-16 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז u|vw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז uvw |xyz</div>', + '7-17 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז uv|w xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז uvw |xyz</div>', + '7-18 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז uvw| xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז uvw |xyz</div>', + '7-19 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז uvw |xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז uvw xyz|</div>', + '7-20 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז uvw x|yz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז uvw xyz|</div>', + '7-21 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז uvw xy|z</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז uvw xyz|</div>', + '7-22 right word'); + +selection_test( + '<div contenteditable dir="ltr">abc def שנב סטז uvw xyz|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">abc def שנב סטז uvw xyz|</div>', + '7-23 right word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_8.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_8.html new file mode 100644 index 0000000..f400e2b --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_8.html
@@ -0,0 +1,153 @@ +<!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">|abc def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|abc def שנב סטז uvw xyz</div>', + '8-0 right word'); + +selection_test( + '<div contenteditable dir="rtl">a|bc def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc| def שנב סטז uvw xyz</div>', + '8-1 right word'); + +selection_test( + '<div contenteditable dir="rtl">ab|c def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc| def שנב סטז uvw xyz</div>', + '8-2 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc| def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|abc def שנב סטז uvw xyz</div>', + '8-3 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc |def שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|abc def שנב סטז uvw xyz</div>', + '8-4 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc d|ef שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|abc def שנב סטז uvw xyz</div>', + '8-5 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc de|f שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">|abc def שנב סטז uvw xyz</div>', + '8-6 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def| שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc| def שנב סטז uvw xyz</div>', + '8-7 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def |שנב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc| def שנב סטז uvw xyz</div>', + '8-8 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def ש|נב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def |שנב סטז uvw xyz</div>', + '8-9 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנ|ב סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def |שנב סטז uvw xyz</div>', + '8-10 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב| סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def |שנב סטז uvw xyz</div>', + '8-11 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב |סטז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def |שנב סטז uvw xyz</div>', + '8-12 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב ס|טז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def שנב |סטז uvw xyz</div>', + '8-13 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סט|ז uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def שנב |סטז uvw xyz</div>', + '8-14 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז| uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def שנב |סטז uvw xyz</div>', + '8-15 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז |uvw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def שנב |סטז uvw xyz</div>', + '8-16 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז u|vw xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז uvw| xyz</div>', + '8-17 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז uv|w xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז uvw| xyz</div>', + '8-18 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז uvw| xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז |uvw xyz</div>', + '8-19 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז uvw |xyz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז |uvw xyz</div>', + '8-20 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז uvw x|yz</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז |uvw xyz</div>', + '8-21 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז uvw xy|z</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז |uvw xyz</div>', + '8-22 right word'); + +selection_test( + '<div contenteditable dir="rtl">abc def שנב סטז uvw xyz|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="rtl">abc def שנב סטז uvw| xyz</div>', + '8-23 right word'); +</script> +
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_9.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_9.html new file mode 100644 index 0000000..7bd1476 --- /dev/null +++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_9.html
@@ -0,0 +1,81 @@ +<!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">|aaa אאא bbb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">aaa |אאא bbb</div>', + '9-0 right word'); + +selection_test( + '<div contenteditable dir="ltr">a|aa אאא bbb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">aaa |אאא bbb</div>', + '9-1 right word'); + +selection_test( + '<div contenteditable dir="ltr">aa|a אאא bbb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">aaa |אאא bbb</div>', + '9-2 right word'); + +selection_test( + '<div contenteditable dir="ltr">aaa| אאא bbb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">aaa |אאא bbb</div>', + '9-3 right word'); + +selection_test( + '<div contenteditable dir="ltr">aaa |אאא bbb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">aaa אאא |bbb</div>', + '9-4 right word'); + +selection_test( + '<div contenteditable dir="ltr">aaa א|אא bbb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">aaa אאא |bbb</div>', + '9-5 right word'); + +selection_test( + '<div contenteditable dir="ltr">aaa אא|א bbb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">aaa אאא |bbb</div>', + '9-6 right word'); + +selection_test( + '<div contenteditable dir="ltr">aaa אאא| bbb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">aaa אאא |bbb</div>', + '9-7 right word'); + +selection_test( + '<div contenteditable dir="ltr">aaa אאא |bbb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">aaa אאא bbb|</div>', + '9-8 right word'); + +selection_test( + '<div contenteditable dir="ltr">aaa אאא b|bb</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">aaa אאא bbb|</div>', + '9-9 right word'); + +selection_test( + '<div contenteditable dir="ltr">aaa אאא bb|b</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">aaa אאא bbb|</div>', + '9-10 right word'); + +selection_test( + '<div contenteditable dir="ltr">aaa אאא bbb|</div>', + selection => selection.modify('move', 'right', 'word'), + '<div contenteditable dir="ltr">aaa אאא bbb|</div>', + '9-11 right word'); +</script> +