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

Side by Side Diff: LayoutTests/fast/canvas/canvas-set-font-with-updated-style.html

Issue 552053003: CanvasRenderingContext2D should update the render tree to avoid stale computed style. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed unnecessary code from tests! Created 6 years, 3 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
« no previous file with comments | « no previous file | LayoutTests/fast/canvas/canvas-set-font-with-updated-style-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <html>
3 <body onload="runTest();">
4 <div>
5 <span>Tests that setting font of Canvas 2d context always uses up-to-date style and has font value: <span id="result"></span></span><br>
6 <canvas id="canvasTest"></canvas>
7 </div>
8 <script type="text/javascript">
9 if (window.testRunner)
10 testRunner.dumpAsText();
11
12 function drawCanvasText(id, text)
13 {
14 var canvasElement = document.getElementById(id);
15 var context = canvasElement.getContext('2d');
16 canvasElement.style.fontSize = '64px';
17 context.font = '1em Calibri';
18 context.fillText(text, 0, 100);
19 return context.font;
20 }
21
22 function runTest()
23 {
24 var fontSize = drawCanvasText('canvasTest', 'Some Text');
25 var resultElement = document.getElementById('result');
26 resultElement.textContent = fontSize;
27 }
28 </script>
29 </body>
30 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/canvas/canvas-set-font-with-updated-style-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698