Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / canvasDrawingIntoSelf.html
blob3f39ac8bd2b1a14ee2606e6ae642e82812988372
1 <p>If this renders correctly you should see one big friendly green square.</p>
2 <canvas id="canvas" width="200" height="200" ></canvas>
3 <script>
4 var canvas = document.getElementById("canvas");
5 var context = canvas.getContext("2d");
6 context.imageSmoothingEnabled = false;
7 context.fillStyle = 'red';
8 context.fillRect(0,0,200,200);
9 context.fillStyle = 'green';
10 context.fillRect(50,50,100,100);
11 context.drawImage(canvas, 50, 50, 100, 100, 0, 0, 200, 200);
12 </script>