4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
5 <link rel=
"stylesheet" type=
"text/css" href=
"resources/extend-selection.css" />
7 test_move_by_word {display: none;}
9 <script src=
"resources/move-by-word-visually.js"></script>
20 if (window
.testRunner
&& window
.internals
) {
21 testRunner
.dumpAsText();
22 internals
.settings
.setEditingBehavior('win');
27 <div id=
"testMoveByWord">
29 Title saves the word breaks.
30 The format of title is "xxx|xxxx".
32 The sequence on the left of "|" is word boundaries when moving caret from left to right.
33 The sequence on the right of "|" is word boundaries when moving caret from right to left.
35 If there is a single node in the line, the sequence are offsets.
36 If there are multiple nodes in the line, the sequence is array of [anchor_node_id, offset, child_node_index],
37 where child_node_index is optional, default is the first child of the anchor node.
40 <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>
41 <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>
44 <div dir=ltr
class=
"test_move_by_word" title=
"0 15 11 7 3 19|19 3 7 11 15 0" contenteditable
>ששש נננ בבב גגג קקק
</div>
45 <div dir=rtl
class=
"test_move_by_word" title=
"19 16 12 8 4 0|0 4 8 12 16 19" contenteditable
>ששש נננ בבב גגג קקק
</div>
48 <!-- English Hebrew English -->
49 <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>
50 <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>
52 <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>
53 <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>
55 <div dir=ltr
class=
"test_move_by_word" title=
"0 4 8 11|11 8 4 0" contenteditable
>aaa אאא bbb
</div>
56 <div dir=rtl
class=
"test_move_by_word" title=
"11 8 4 0|0 4 8 11" contenteditable
>aaa אאא bbb
</div>
58 <!-- Hebrew English Hebrew -->
59 <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>
60 <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>
62 <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>
63 <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>
65 <div dir=ltr
class=
"test_move_by_word" title=
"0 4 8 11|11 8 4 0" contenteditable
>שנב abc סטז
</div>
66 <div dir=rtl
class=
"test_move_by_word" title=
"11 8 4 0|0 4 8 11" contenteditable
>שנב abc סטז
</div>
68 <!-- Test with Bidi control characters -->
69 <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>
71 <!-- Test with image -- non-inline-text-box -->
72 <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>
74 <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>
77 <div dir=ltr
class=
"test_move_by_word" title=
"0|0" contenteditable
></div>
80 <pre id=
"console"></pre>