4 <META http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
10 <p>Well-formed pair of unicode bidi control characters.
11 <div>‫b!
‬</div>
12 <div>‪b!
‬</div>
14 <p>Unpaired unicode bidi control characters.
18 <p>Empty content inside unicode bidi control characters.
19 <div>‬‬</div>
20 <div>‪‪</div>
21 <div>‫‫</div>
23 <p>String inside unicode bidi control characters.
24 <div contenteditable
id=
"test">‬abc
‬</div>
25 <div>‪abc
‪</div>
26 <div>‫abc
‫</div>
28 <p>String around unicode bidi control characters.
29 <div>def
‬abc
‬</div>
30 <div>‬abc
‬def
</div>
31 <div>xyz
‬abc
‬def
</div>
33 <p>Nested unicode bidi control characters.
34 <div>‪‪b!
‬</div>
35 <div>‫‫b!
‬</div>
36 <div>‬‬b!
‬</div>
37 <div>‬1‫c!
‬</div>
39 <p>Start with different directionality characters.
40 <div>12‬‪1‬‫
</div>
41 <div>12‬‪</div>
42 <div>٠١‬‪</div>
43 <div>ڃڄ‬‪</div>
44 <div>‬‪</div>
45 <div>abc
‬‪</div>
46 <div>אב‬‪</div>
52 <p>Well-formed pair of unicode bidi control characters.
53 <div>‫b!
‬</div>
54 <div>‪b!
‬</div>
56 <p>Unpaired unicode bidi control characters.
60 <p>Empty content inside unicode bidi control characters.
61 <div>‬‬</div>
62 <div>‪‪</div>
63 <div>‫‫</div>
65 <p>String inside unicode bidi control characters.
66 <div>‬abc
‬</div>
67 <div>‪abc
‪</div>
68 <div>‫abc
‫</div>
70 <p>String around unicode bidi control characters.
71 <div>def
‬abc
‬</div>
72 <div>‬abc
‬def
</div>
73 <div>xyz
‬abc
‬def
</div>
75 <p>Nested unicode bidi control characters.
76 <div>‪‪b!
‬</div>
77 <div>‫‫b!
‬</div>
78 <div>‬‬b!
‬</div>
79 <div>‬1‫c!
‬</div>
81 <p>Start with different directionality characters.
82 <div>12‬‪1‬‫
</div>
83 <div>12‬‪</div>
84 <div>٠١‬‪</div>
85 <div>ڃڄ‬‪</div>
86 <div>‬‪</div>
87 <div>abc
‬‪</div>
88 <div>אב‬‪</div>
90 <ul id=
"console" dir=ltr
></ul>
97 var li
= document
.createElement("li");
98 li
.appendChild(document
.createTextNode(str
));
99 var console
= document
.getElementById("console");
100 console
.appendChild(li
);
103 function assertEqual(message
, actual
, expected
)
105 if (actual
!= expected
)
106 log("\n" + message
+ ": Failure, actual: " + actual
+ "; expected: " + expected
);
108 log("\n" + message
+ ": Success");
111 var test
= document
.getElementById('test');
112 var sel
= getSelection();
113 sel
.collapse(test
,0);
114 sel
.modify("move", "right", "lineBoundary");
115 sel
.modify("move", "left", "character");
116 sel
.modify("extend", "left", "character");
117 assertEqual("test id=test: the right-most character of rendering result of <PDF>abc<PDF> in RTL block should be c", sel
.toString(), 'c');