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

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

Issue 2386453003: WIP: Implement APNG (Closed)
Patch Set: Fix memory leaks by using FastSharedReadBuffer and defining it smartly 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/canvas/philip/tests/2d.drawImage.animated.poster.html
diff --git a/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.drawImage.animated.poster.html b/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.drawImage.animated.poster.html
index 123b890883f699c17a1ace889fe81daee0810fdb..6b6564fd776f2e5d4f3cb1bb4eee55a914788b17 100644
--- a/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.drawImage.animated.poster.html
+++ b/third_party/WebKit/LayoutTests/canvas/philip/tests/2d.drawImage.animated.poster.html
@@ -12,8 +12,26 @@
<script>
_addTest(function(canvas, ctx) {
-ctx.drawImage(document.getElementById('anim-poster-gr.png'), 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
+// This test verifies that the poster frame of an animated PNG is drawn on a
+// drawImage call on a canvas, even though the poster frame is not part of the
+// animation. That is, when there's no fcTL before the IDAT chunk, this test
+// still expects the image decoder to draw the IDAT frame, even though it is
+// not part of the animation.
+//
+// Given that the ImageDecoder is not aware of what method is requesting the
+// decode, and that the APNG specification [1] does explicitly state that the
+// IDAT is not part of the animated image if there's no fcTL chunk preceding it,
+// this test is disabled. It would make more sense if this test would verify
+// that the first frame of the image is drawn, but that is explicitly not the
+// purpose, as stated at [2]. In Firefox, the developer of the APNG
+// specification, this test [2] fails too.
+//
+// [1] https://wiki.mozilla.org/APNG_Specification
+// [2] http://www.w3c-test.org/2dcontext/drawing-images-to-the-canvas/2d.drawImage.animated.apng.html
+ _assertSame("disabled", "disabled", "disabled", "disabled");
+
+// ctx.drawImage(document.getElementById('anim-poster-gr.png'), 0, 0);
+// _assertPixelApprox(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 2);
});

Powered by Google App Engine
This is Rietveld 408576698