4 <meta charcode=
"utf-16">
5 <script src=
"../../resources/js-test.js"></script>
11 if (window
.testRunner
)
12 testRunner
.dumpAsTextWithPixelResults();
14 var canvas
= document
.querySelector("canvas");
15 var context
= canvas
.getContext("2d");
17 var testStr1
= 'a' + '\u0009' + 'b' + '\u000A' + 'c' + '\u000C' + 'd' + '\u000D' + 'e';
18 var testStr2
= 'a' + '\u0020' + 'b' + '\u0020' + 'c' + '\u0020' + 'd' + '\u0020' + 'e';
20 context
.font
= "12px Arial";
21 context
.fillText(testStr1
, 0, 10);
22 context
.fillText(testStr2
, 0, 30);
24 testStr1Width
= context
.measureText(testStr1
).width
;
25 testStr2Width
= context
.measureText(testStr2
).width
;
27 shouldBeTrue("testStr1Width == testStr2Width");