| Index: third_party/WebKit/LayoutTests/fast/images/jpeg-yuv-progressive-canvas.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/images/jpeg-yuv-progressive-canvas.html b/third_party/WebKit/LayoutTests/fast/images/jpeg-yuv-progressive-canvas.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..464c30c5647a20d47a2bfa28530b2cc8d78c98f9
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/images/jpeg-yuv-progressive-canvas.html
|
| @@ -0,0 +1,52 @@
|
| +<!DOCTYPE html>
|
| +<!-- test case for crbug.com/597127 -->
|
| +<html>
|
| +<head>
|
| +<!-- Use a <meta> viewport, see http://crbug.com/598949 -->
|
| +<meta name="viewport" content="width=device-width, minimum-scale=1.0">
|
| +<style>
|
| + canvas {
|
| + border: 2px solid black;
|
| + margin: 5px 5px 0px 5px;
|
| + padding: 2px;
|
| + width: 150px;
|
| + height: 150px;
|
| + }
|
| +</style>
|
| +</head>
|
| +
|
| +<script>
|
| +if (window.testRunner) {
|
| + testRunner.dumpAsTextWithPixelResults();
|
| + testRunner.waitUntilDone();
|
| +}
|
| +
|
| +var totalTestImages = 4;
|
| +
|
| +window.onload = function() {
|
| + for (var x = 0; x < totalTestImages; ++x)
|
| + loadImage(x);
|
| +};
|
| +
|
| +function loadImage(x) {
|
| + var image = new Image();
|
| +
|
| + var canvas = document.createElement('canvas');
|
| + canvas.width = canvas.height = 150;
|
| +
|
| + document.body.appendChild(canvas);
|
| +
|
| + image.onload = function() {
|
| + canvas.getContext('2d').drawImage(this, 0, 0, 150, 150);
|
| + setTimeout(canvasLoaded, 0, x + 1);
|
| + };
|
| +
|
| + image.src = 'resources/ycbcr-progressive-00' + x + '.jpg';
|
| +}
|
| +
|
| +function canvasLoaded(x) {
|
| + if (x >= totalTestImages && window.testRunner)
|
| + testRunner.notifyDone();
|
| +}
|
| +</script>
|
| +</html>
|
|
|