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

Unified Diff: LayoutTests/fast/canvas/canvas-createImageBitmap-animated.html

Issue 22346004: Ensure that createImageBitmap takes a snapshot of a gifs frame 0 image. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/canvas/canvas-createImageBitmap-animated-expected.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/canvas/canvas-createImageBitmap-animated.html
diff --git a/LayoutTests/fast/canvas/canvas-createImageBitmap-animated.html b/LayoutTests/fast/canvas/canvas-createImageBitmap-animated.html
new file mode 100644
index 0000000000000000000000000000000000000000..411b032c07994bada95a6303d01f43d71d06fe1a
--- /dev/null
+++ b/LayoutTests/fast/canvas/canvas-createImageBitmap-animated.html
@@ -0,0 +1,33 @@
+<html>
+<body>
+<canvas id="c"></canvas>
+<script>
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ function finishTest() {
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+
+ var canvas = document.getElementById("c");
+ canvas.setAttribute("width", "200");
Justin Novosad 2013/08/07 18:56:55 canvas.width = 200;
+ canvas.setAttribute("height", "200");
+ var ctx = canvas.getContext("2d");
+
+ var img = new Image();
+ img.src = 'resources/green-red-animated.gif';
+ img.onload = imageLoaded();
+
+ function imageLoaded() {
+ window.setTimeout(function() {
+ createImageBitmap(img).then(function (imageBitmap) {
+ ctx.drawImage(imageBitmap, 0, 0);
Justin Novosad 2013/08/07 18:56:55 Instead of implementing this as a ref test, it cou
+ finishTest();
+ }, finishTest);
+ }, 200);
Justin Novosad 2013/08/07 18:56:55 This 200ms seems to come out of nowhere. I think
+ }
+</script>
+<p>A green square should be visible.</p>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/canvas/canvas-createImageBitmap-animated-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698