| Index: LayoutTests/canvas/state-stack-pass.html
|
| diff --git a/LayoutTests/canvas/state-stack-pass.html b/LayoutTests/canvas/state-stack-pass.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..156a66f882cb168faae0304761f1d960fcc3d256
|
| --- /dev/null
|
| +++ b/LayoutTests/canvas/state-stack-pass.html
|
| @@ -0,0 +1,51 @@
|
| +<!DOCTYPE html>
|
| +<title>Canvas.drawImage with narrow destination.</title>
|
| +<html>
|
| + <body>
|
| + <canvas id="myCanvas" width="100" height="100"></canvas>
|
| + <script>
|
| + var canvas = document.getElementById('myCanvas');
|
| + var context = canvas.getContext('2d');
|
| + var width = 100, height = 100;
|
| + var x1 = 0, y1 = 0, w = width, h = height;
|
| +
|
| + function draw() {
|
| + context.restore();
|
| + context.clearRect(0, 0, width, height);
|
| + context.beginPath();
|
| + context.rect(x1, y1, w, h);
|
| + context.fillStyle = 'blue';
|
| + context.fill();
|
| + x1+=5;
|
| + y1+=5;
|
| + w-=10;
|
| + h-=10;
|
| +
|
| + context.save();
|
| + context.beginPath();
|
| + context.rect(200, 200, 400, 400);
|
| + context.clip();
|
| +
|
| + // if (w > 0) {
|
| + // setTimeout(draw, 1);
|
| + // } else {
|
| + finishTest('PASS');
|
| + // }
|
| + }
|
| +
|
| + context.beginPath();
|
| + context.rect(0, 0, 800, 800);
|
| + context.fillStyle = 'blue';
|
| + context.fill();
|
| + context.save();
|
| + draw();
|
| + function finishTest(output) {
|
| + document.write(output);
|
| + if (window.testRunner) {
|
| + testRunner.dumpAsText();
|
| + testRunner.notifyDone();
|
| + }
|
| + }
|
| + </script>
|
| + </body>
|
| +</html>
|
|
|