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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/canvas/canvas-createImageBitmap-animated-expected.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <body>
3 <canvas id="c"></canvas>
4 <script>
5 if (window.testRunner)
6 testRunner.waitUntilDone();
7
8 function finishTest() {
9 if (window.testRunner)
10 testRunner.notifyDone();
11 }
12
13 var canvas = document.getElementById("c");
14 canvas.setAttribute("width", "200");
Justin Novosad 2013/08/07 18:56:55 canvas.width = 200;
15 canvas.setAttribute("height", "200");
16 var ctx = canvas.getContext("2d");
17
18 var img = new Image();
19 img.src = 'resources/green-red-animated.gif';
20 img.onload = imageLoaded();
21
22 function imageLoaded() {
23 window.setTimeout(function() {
24 createImageBitmap(img).then(function (imageBitmap) {
25 ctx.drawImage(imageBitmap, 0, 0);
Justin Novosad 2013/08/07 18:56:55 Instead of implementing this as a ref test, it cou
26 finishTest();
27 }, finishTest);
28 }, 200);
Justin Novosad 2013/08/07 18:56:55 This 200ms seems to come out of nowhere. I think
29 }
30 </script>
31 <p>A green square should be visible.</p>
32 </body>
33 </html>
OLDNEW
« 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