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

Side by Side Diff: LayoutTests/fast/images/paint-subrect-grid.html

Issue 24438004: Rename testRunner.dumpAsText(true) to testRunner.dumpAsTextWithPixelResults() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: more tests Created 7 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 | Annotate | Revision Log
OLDNEW
1 <canvas id="canvas" width="30" height="30"></canvas> 1 <canvas id="canvas" width="30" height="30"></canvas>
2 <script> 2 <script>
3 if (window.testRunner) 3 if (window.testRunner)
4 testRunner.dumpAsText(true); 4 testRunner.dumpAsTextWithPixelResults();
5 5
6 var img = new Image(); 6 var img = new Image();
7 // This is a 11x11 black and white grid. 7 // This is a 11x11 black and white grid.
8 img.src = 'resources/grid-small.png'; 8 img.src = 'resources/grid-small.png';
9 9
10 function drawSubRectScaled(ctx, img, x, y, w, h, scale) 10 function drawSubRectScaled(ctx, img, x, y, w, h, scale)
11 { 11 {
12 ctx.drawImage(img, x, y, w, h, x * scale, y * scale, w * scale, h * scale); 12 ctx.drawImage(img, x, y, w, h, x * scale, y * scale, w * scale, h * scale);
13 } 13 }
14 14
(...skipping 19 matching lines...) Expand all
34 // Draw the middle row. 34 // Draw the middle row.
35 drawSubRectScaled(ctx, img, 0, 3.66, 5.5, 3.66, scale); 35 drawSubRectScaled(ctx, img, 0, 3.66, 5.5, 3.66, scale);
36 drawSubRectScaled(ctx, img, 5.5, 3.66, 5.5, 3.66, scale); 36 drawSubRectScaled(ctx, img, 5.5, 3.66, 5.5, 3.66, scale);
37 37
38 // Draw the bottom row. 38 // Draw the bottom row.
39 drawSubRectScaled(ctx, img, 0, 7.33, 3.66, 3.66, scale); 39 drawSubRectScaled(ctx, img, 0, 7.33, 3.66, 3.66, scale);
40 drawSubRectScaled(ctx, img, 3.66, 7.33, 3.66, 3.66, scale); 40 drawSubRectScaled(ctx, img, 3.66, 7.33, 3.66, 3.66, scale);
41 drawSubRectScaled(ctx, img, 7.33, 7.33, 3.66, 3.66, scale); 41 drawSubRectScaled(ctx, img, 7.33, 7.33, 3.66, 3.66, scale);
42 } 42 }
43 </script> 43 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/images/paint-subrect.html ('k') | LayoutTests/fast/images/paletted-png-with-color-profile.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698