3 <meta charset=
"utf-8" />
6 testRunner
.dumpAsText();
11 This test ensures that combining marks apper over the previous (or next) character by comparing the length of
12 words (one has marks, and the other doesn't have marks).
15 <div style=
"font-family: arial; text-rendering: optimizeLegibility;">
16 <span id=
"reference1">test проверка
</span>
18 <div style=
"font-family: arial;">
19 <span id=
"target1">te
̀st прове
̀рка
</span>
23 <span id=
"reference2">خانه
</span>
26 <span id=
"target2">خانهٔ
</span>
29 <div id=
"result"></div>
32 var reference1
= document
.getElementById('reference1');
33 var target1
= document
.getElementById('target1');
34 var reference2
= document
.getElementById('reference2');
35 var target2
= document
.getElementById('target2');
36 var result
= document
.getElementById('result');
38 // Ignore a slight diff of the width between target and reference.
39 var diff1
= Math
.abs(reference1
.offsetWidth
- target1
.offsetWidth
);
40 var diff2
= Math
.abs(reference2
.offsetWidth
- target2
.offsetWidth
);
41 if (diff1
< 2 && diff2
< 2)
42 result
.innerHTML
= 'PASS. The length of targets and references are the same.<br />'
44 result
.innerHTML
= 'FAIL<br />' +
45 'reference1.offsetWidth = ' + reference1
.offsetWidth
+ '<br />' +
46 'target1.offsetWidth = ' + target1
.offsetWidth
+ '<br />' +
47 'reference2.offsetWidth = ' + reference2
.offsetWidth
+ '<br />' +
48 'target2.offsetWidth = ' + target2
.offsetWidth
+ '<br />'