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

Side by Side Diff: LayoutTests/canvas/philip/tests/2d.gradient.interpolate.colouralpha.html

Issue 16691002: Improve the LayoutTest related with Config conversions for Canvas2D (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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-fillPath-shadow-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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Canvas test: 2d.gradient.interpolate.colouralpha</title> 2 <title>Canvas test: 2d.gradient.interpolate.colouralpha</title>
3 <script src="../tests.js"></script> 3 <script src="../tests.js"></script>
4 <link rel="stylesheet" href="../tests.css"> 4 <link rel="stylesheet" href="../tests.css">
5 <body> 5 <body>
6 <p id="passtext">Pass</p> 6 <p id="passtext">Pass</p>
7 <p id="failtext">Fail</p> 7 <p id="failtext">Fail</p>
8 <p class="output">These images should be identical:</p> 8 <p class="output">These images should be identical:</p>
9 <canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL ( fallback content)</p></canvas> 9 <canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL ( fallback content)</p></canvas>
10 <p class="output expectedtext">Expected output:<p><img src="2d.gradient.interpol ate.colouralpha.png" class="output expected" id="expected" alt=""> 10 <p class="output expectedtext">Expected output:<p><img src="2d.gradient.interpol ate.colouralpha.png" class="output expected" id="expected" alt="">
11 <ul id="d"></ul> 11 <ul id="d"></ul>
12 <script> 12 <script>
13 _addTest(function(canvas, ctx) { 13 _addTest(function(canvas, ctx) {
14 14
15 var g = ctx.createLinearGradient(0, 0, 100, 0); 15 var g = ctx.createLinearGradient(0, 0, 100, 0);
16 g.addColorStop(0, 'rgba(255,255,0, 0)'); 16 g.addColorStop(0, 'rgba(255,255,0, 0)');
17 g.addColorStop(1, 'rgba(0,0,255, 1)'); 17 g.addColorStop(1, 'rgba(0,0,255, 1)');
18 ctx.fillStyle = g; 18 ctx.fillStyle = g;
19 ctx.fillRect(0, 0, 100, 50); 19 ctx.fillRect(0, 0, 100, 50);
20 _assertPixelApprox(canvas, 25,25, 191,191,63,63, "25,25", "191,191,63,63", 3); 20 _assertPixelApprox(canvas, 25,25, 191,191,63,63, "25,25", "191,191,63,63", 4);
21 _assertPixelApprox(canvas, 50,25, 127,127,127,127, "50,25", "127,127,127,127", 3 ); 21 _assertPixelApprox(canvas, 50,25, 127,127,127,127, "50,25", "127,127,127,127", 3 );
22 _assertPixelApprox(canvas, 75,25, 63,63,191,191, "75,25", "63,63,191,191", 3); 22 _assertPixelApprox(canvas, 75,25, 63,63,191,191, "75,25", "63,63,191,191", 3);
23 23
24 24
25 }); 25 });
26 </script> 26 </script>
27 27
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/canvas/canvas-fillPath-shadow-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698