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

Side by Side Diff: LayoutTests/fast/images/paint-subrect.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="200" height="100"></canvas> 1 <canvas id="canvas" width="200" height="100"></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 2x1 image, blue at (0, 0) and green at (1, 0). 7 // This is a 2x1 image, blue at (0, 0) and green at (1, 0).
8 img.src = 'data:image/png;base64,' + 8 img.src = 'data:image/png;base64,' +
9 'iVBORw0KGgoAAAANSUhEUgAAAAIAAAABCAIAAAB7QOjdAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwA A' + 9 'iVBORw0KGgoAAAANSUhEUgAAAAIAAAABCAIAAAB7QOjdAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwA A' +
10 'CxMBAJqcGAAAAAd0SU1FB9wIGxQKIbPpHtMAAAAPSURBVAjXY2Bg+M/wnwEABgEB/6KPEdkAAAAASUV O' + 10 'CxMBAJqcGAAAAAd0SU1FB9wIGxQKIbPpHtMAAAAPSURBVAjXY2Bg+M/wnwEABgEB/6KPEdkAAAAASUV O' +
11 'RK5CYII='; 11 'RK5CYII=';
12 12
13 img.onload = function() 13 img.onload = function()
14 { 14 {
15 // Start from the middle of the blue pixel and stretch to the entire 15 // Start from the middle of the blue pixel and stretch to the entire
16 // canvas. Canvas should have 1/3 blue on the left and 2/3 green on the 16 // canvas. Canvas should have 1/3 blue on the left and 2/3 green on the
17 // right, with gradient if interpolation allows. 17 // right, with gradient if interpolation allows.
18 var ctx = document.getElementById("canvas").getContext("2d"); 18 var ctx = document.getElementById("canvas").getContext("2d");
19 ctx.drawImage(img, 0.5, 0, 1.5, 1, 0, 0, 200, 100); 19 ctx.drawImage(img, 0.5, 0, 1.5, 1, 0, 0, 200, 100);
20 } 20 }
21 </script> 21 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/images/object-image.html ('k') | LayoutTests/fast/images/paint-subrect-grid.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698