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

Side by Side Diff: LayoutTests/fast/canvas/canvas-drawImage-animated.html

Issue 388253004: Drawing an animated image to a canvas now behave as expected (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Correcting bug and moving logic to HTMLImageElenemt Created 6 years, 5 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
OLDNEW
(Empty)
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body onload="javascript:ready()">
7 <img id="image" src="data:image/gif;base64,R0lGODlhAQABAIACAEAEHgqZHiH+E UNyZWF0ZWQgd2l0aCBHSU1QACH5BAkAAAEALAAAAAABAAEAAAICRAEAIfkECAAA/wAsAAAAAAEAAQAAA gJMAQA7" alt="Animated Image" />
Justin Novosad 2014/07/24 17:49:22 Add a comment to explain what is in this image
Rémi Piotaix 2014/07/25 18:21:00 Done.
8 <canvas id="canvas" width="1" height="1"></canvas>
9
10 <script>
11 function ready() {
12 var canvas = document.getElementById("canvas");
13 var image = document.getElementById("image");
14
15 var canvasContext = canvas.getContext("2d");
16
17 canvasContext.drawImage(image, 0, 0);
18
19 // requestAnimationFrame(truc);
Justin Novosad 2014/07/24 17:49:22 Don't submit commented code.
Rémi Piotaix 2014/07/25 18:21:00 Done.
20
21 // function truc() {
22
23 imageData = canvasContext.getImageData(0, 0, 1, 1);
Justin Novosad 2014/07/24 17:49:22 Did you verify that this test fails without your f
Rémi Piotaix 2014/07/25 18:21:00 The test fails on M35/36.
24
25 // requestAnimationFrame(function() {
26
27 console.log(imageData);
28 shouldBe("imageData.data[0]", "64");
29 shouldBe("imageData.data[1]", "4");
30 shouldBe("imageData.data[2]", "30");
31 // });
32 // }
33
34 // shouldBe(false, true);
35
36 }
37 </script>
38
39 </body>
40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698