| Index: LayoutTests/fast/canvas/canvas-large-pattern.html
 | 
| diff --git a/LayoutTests/fast/canvas/canvas-large-pattern.html b/LayoutTests/fast/canvas/canvas-large-pattern.html
 | 
| new file mode 100644
 | 
| index 0000000000000000000000000000000000000000..3f648e83fc4094aa3e7377d5722ef1d2b7d8e5ac
 | 
| --- /dev/null
 | 
| +++ b/LayoutTests/fast/canvas/canvas-large-pattern.html
 | 
| @@ -0,0 +1,48 @@
 | 
| +<!DOCTYPE HTML>
 | 
| +<html>
 | 
| +<body>
 | 
| +    <script src="../js/resources/js-test-pre.js"></script>
 | 
| +    <script type="text/javascript">
 | 
| +
 | 
| +        description("Verifies createPattern using a source image that is a canvas 40k pixels wide.");
 | 
| +        // This test does not currently succeed because skia does not handle
 | 
| +        // canvases more than 32k pixels wide. For now, this test serves the
 | 
| +        // purpose of verifying that this use case does not crash the browser.
 | 
| +        // Crasher bug: crbug.com/281504
 | 
| +
 | 
| +            var canvas = document.createElement('canvas');
 | 
| +            canvas.width = 40000;
 | 
| +            var context = canvas.getContext('2d');
 | 
| +            context.fillStyle = '#0f0';
 | 
| +            context.fillRect(0, 0, 1, 1);
 | 
| +
 | 
| +            var dstCanvas = document.createElement('canvas');
 | 
| +            var dstContext = dstCanvas.getContext('2d');
 | 
| +            var pattern = dstContext.createPattern(canvas, 'repeat');
 | 
| +            dstContext.fillStyle = pattern;
 | 
| +            dstContext.fillRect(0, 0, dstCanvas.width, dstCanvas.height);
 | 
| +
 | 
| +            var imageData = dstContext.getImageData(0, 0, 1, 1);
 | 
| +            var imgdata = imageData.data;
 | 
| +            shouldBe("imgdata[0]", "0");
 | 
| +            shouldBe("imgdata[1]", "255");
 | 
| +            shouldBe("imgdata[2]", "0");
 | 
| +            shouldBe("imgdata[3]", "255");
 | 
| +
 | 
| +            imageData = dstContext.getImageData(1, 0, 1, 1);
 | 
| +            imgdata = imageData.data;
 | 
| +            shouldBe("imgdata[0]", "0");
 | 
| +            shouldBe("imgdata[1]", "0");
 | 
| +            shouldBe("imgdata[2]", "0");
 | 
| +            shouldBe("imgdata[3]", "0");
 | 
| +
 | 
| +            imageData = dstContext.getImageData(0, 1, 1, 1);
 | 
| +            imgdata = imageData.data;
 | 
| +            shouldBe("imgdata[0]", "0");
 | 
| +            shouldBe("imgdata[1]", "0");
 | 
| +            shouldBe("imgdata[2]", "0");
 | 
| +            shouldBe("imgdata[3]", "0");
 | 
| +    </script>
 | 
| +    <script src="../js/resources/js-test-post.js"></script>
 | 
| +</body>
 | 
| +</html>
 | 
| 
 |