Chromium Code Reviews| Index: LayoutTests/fast/canvas/canvas-drawImage-animated.html |
| diff --git a/LayoutTests/fast/canvas/canvas-drawImage-animated.html b/LayoutTests/fast/canvas/canvas-drawImage-animated.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9c8db13f42f2b8dbe772b33fd14f63db5c5f91bb |
| --- /dev/null |
| +++ b/LayoutTests/fast/canvas/canvas-drawImage-animated.html |
| @@ -0,0 +1,40 @@ |
| +<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| +<html> |
| + <head> |
| + <script src="../../resources/js-test.js"></script> |
| + </head> |
| + <body onload="javascript:ready()"> |
| + <img id="image" src="data:image/gif;base64,R0lGODlhAQABAIACAEAEHgqZHiH+EUNyZWF0ZWQgd2l0aCBHSU1QACH5BAkAAAEALAAAAAABAAEAAAICRAEAIfkECAAA/wAsAAAAAAEAAQAAAgJMAQA7" 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.
|
| + <canvas id="canvas" width="1" height="1"></canvas> |
| + |
| + <script> |
| + function ready() { |
| + var canvas = document.getElementById("canvas"); |
| + var image = document.getElementById("image"); |
| + |
| + var canvasContext = canvas.getContext("2d"); |
| + |
| + canvasContext.drawImage(image, 0, 0); |
| + |
| +// 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.
|
| + |
| +// function truc() { |
| + |
| + 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.
|
| + |
| +// requestAnimationFrame(function() { |
| + |
| + console.log(imageData); |
| + shouldBe("imageData.data[0]", "64"); |
| + shouldBe("imageData.data[1]", "4"); |
| + shouldBe("imageData.data[2]", "30"); |
| +// }); |
| +// } |
| + |
| +// shouldBe(false, true); |
| + |
| + } |
| + </script> |
| + |
| + </body> |
| +</html> |