4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
5 <title>Test for bug
51344: move left/right by character should not hang.
</title>
8 <p>Test for bug
51344: move left/right by character should not hang.
9 <div id=
"test" dir=
"ltr" contenteditable
>١١
123مارس
</div>
10 <div id=
"test_rtl" dir=
"rtl" contenteditable
>זח ‪דה‪car
ו‬‬ </div>
12 <ul id=
"console"></ul>
15 if (window
.testRunner
)
16 testRunner
.dumpAsText();
19 var li
= document
.createElement("li");
20 li
.appendChild(document
.createTextNode(str
));
21 var console
= document
.getElementById("console");
22 console
.appendChild(li
);
25 function assert(bool
) {
32 var test
= document
.getElementById('test');
33 var selection
= window
.getSelection();
34 selection
.collapse(test
.firstChild
, 6);
35 selection
.modify('move', 'right', 'character');
36 var offset
= selection
.anchorOffset
;
38 test
.style
.display
= "none";
40 test
= document
.getElementById('test_rtl');
41 selection
= window
.getSelection();
42 selection
.collapse(test
.firstChild
, 3);
43 selection
.modify('move', 'left', 'character');
44 offset
= selection
.anchorOffset
;
46 test
.style
.display
= "none";