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

Side by Side Diff: LayoutTests/fast/canvas/font-update.html

Issue 187393007: Convert some pixel tests in fast/canvas into ref tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 <style> 1 <style>
2 @font-face { 2 @font-face {
3 font-family: no-such-font; 3 font-family: no-such-font;
4 src: url(no-such-file.ttf); 4 src: url(no-such-file.ttf);
5 } 5 }
6 </style> 6 </style>
7 <canvas id="target"></canvas> 7 <canvas id="target"></canvas>
8 <script> 8 <script>
9 canvas = document.getElementById("target"); 9 canvas = document.getElementById("target");
10 ctx = canvas.getContext('2d'); 10 ctx = canvas.getContext('2d');
11 ctx.font = "100px no-such-font, ahem"; 11 ctx.font = "100px no-such-font, ahem";
12 ctx.fillStyle = "red"; 12 ctx.fillStyle = "red";
13 ctx.fillText("B", 0, 100); 13 ctx.fillText("B", 0, 100);
14 ctx.fillStyle = "green"; 14 ctx.fillStyle = "green";
15 canvas.parentNode.removeChild(canvas); 15 canvas.parentNode.removeChild(canvas);
16 if (window.testRunner) { 16 if (window.testRunner) {
17 testRunner.dumpAsTextWithPixelResults();
18 testRunner.waitUntilDone(); 17 testRunner.waitUntilDone();
19 } 18 }
Stephen White 2014/03/05 21:29:33 Nit: weird formatting (not new to this patch). Cou
20 setTimeout(function() 19 setTimeout(function()
21 { 20 {
22 ctx.fillText("A", 0, 100); 21 ctx.fillText("A", 0, 100);
23 document.body.appendChild(canvas); 22 document.body.appendChild(canvas);
24 if (window.testRunner) 23 if (window.testRunner)
25 testRunner.notifyDone(); 24 testRunner.notifyDone();
26 }, 50); 25 }, 50);
27 </script> 26 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698