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

Side by Side Diff: third_party/WebKit/LayoutTests/canvas/philip/tests/2d.drawImage.animated.poster.html

Issue 2386453003: WIP: Implement APNG (Closed)
Patch Set: Disable LayoutTest canvas/tests/2d.drawImage.animated.apng Created 4 years 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 | third_party/WebKit/LayoutTests/images/resources/png-animated-idat-not-part-of-animation.png » ('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.drawImage.animated.poster</title> 2 <title>Canvas test: 2d.drawImage.animated.poster</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="green-100x50.png" cl ass="output expected" id="expected" alt=""> 10 <p class="output expectedtext">Expected output:<p><img src="green-100x50.png" cl ass="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 ctx.drawImage(document.getElementById('anim-poster-gr.png'), 0, 0); 15 // This test verifies that the poster frame of an animated PNG is drawn on a
scroggo_chromium 2016/12/12 16:06:39 Can we instead delete the test?
joostouwerling 2016/12/12 17:53:20 I'm hesitant about that since it is part of a larg
scroggo_chromium 2016/12/14 14:18:06 Are you saying that we copy those tests here from
joostouwerling 2016/12/16 19:59:32 That could be the case. I'm not sure if it is sync
16 _assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2); 16 // drawImage call on a canvas, even though the poster frame is not part of the
17 // animation. That is, when there's no fcTL before the IDAT chunk, this test
18 // still expects the image decoder to draw the IDAT frame, even though it is
19 // not part of the animation.
20 //
21 // Given that the ImageDecoder is not aware of what method is requesting the
22 // decode, and that the APNG specification [1] does explicitly state that the
23 // IDAT is not part of the animated image if there's no fcTL chunk preceding it,
24 // this test is disabled. It would make more sense if this test would verify
25 // that the first frame of the image is drawn, but that is explicitly not the
26 // purpose, as stated at [2]. In Firefox, the developer of the APNG
27 // specification, this test [2] fails too.
28 //
29 // [1] https://wiki.mozilla.org/APNG_Specification
30 // [2] http://www.w3c-test.org/2dcontext/drawing-images-to-the-canvas/2d.drawIma ge.animated.apng.html
31
32 // ctx.drawImage(document.getElementById('anim-poster-gr.png'), 0, 0);
33 // _assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
17 34
18 35
19 }); 36 });
20 </script> 37 </script>
21 <img src="../images/anim-poster-gr.png" id="anim-poster-gr.png" class="resource" > 38 <img src="../images/anim-poster-gr.png" id="anim-poster-gr.png" class="resource" >
22 39
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/images/resources/png-animated-idat-not-part-of-animation.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698