Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / canvas-text-space-characters.html
blobb42f32855a513fbc311f6ea363e8962382f255c6
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charcode="utf-16">
5 <script src="../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <canvas></canvas>
9 <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");
29 </script>
30 </body>
31 </html>