Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / canvas-measure-text-rtl.html
blob3246d0708274325b0acc4d7d6a7561ac2bf05200
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>measureText directionality</title>
5 <meta charset="utf-8">
6 <style>
7 canvas { background: green; }
8 </style>
9 </head>
10 <body>
11 <h1>measureText directionality</h1>
12 <canvas id="canvas" width="150" height="150"></canvas>
13 <p>
14 There should be a green box above with no red.
15 </p>
16 <script>
17 var text = '\u200D\u0628';
18 var canvas = document.getElementById('canvas');
19 var context = canvas.getContext('2d');
20 context.font = '48pt Times New Roman';
21 context.fillStyle= 'red';
22 context.fillText(text, 50, 100);
23 var width = context.measureText(text).width + 4;
24 context.fillStyle = 'green';
25 context.fillRect(50, 1, width, 148);
26 </script>
27 </body>
28 </html>