Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: LayoutTests/fast/canvas/canvas-text-space-characters.html

Issue 293653002: Canvas fillText and measureText handle ideographic spaces differently. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add v/g/* test expectations Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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>
10
11 if (window.testRunner)
12 testRunner.dumpAsTextWithPixelResults();
13
14 var canvas = document.querySelector("canvas");
15 var context = canvas.getContext("2d");
16
17 var testStr1 = 'a' + '\u0009' + 'b' + '\u000A' + 'c' + '\u000C' + 'd' + '\u0 00D' + 'e';
18 var testStr2 = 'a' + '\u0020' + 'b' + '\u0020' + 'c' + '\u0020' + 'd' + '\u0 020' + 'e';
19
20 context.font = "12px Arial";
21 context.fillText(testStr1, 0, 10);
22 context.fillText(testStr2, 0, 30);
23
24 testStr1Width = context.measureText(testStr1).width;
25 testStr2Width = context.measureText(testStr2).width;
26
27 shouldBeTrue("testStr1Width == testStr2Width");
28
29 </script>
30 </body>
31 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/canvas/canvas-text-ideographic-space.html ('k') | Source/core/html/canvas/CanvasRenderingContext2D.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698