Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / repaint / canvas-resize.html
blob5cc566a7235be73275f94a20f249691e90a5de26
1 <!DOCTYPE html>
2 <style>
3 canvas {
4 position: absolute;
5 width: 600px;
6 height: 500px;
7 top: 50px;
8 left: 50px;
10 </style>
11 Tests paint invalidation of canvas when it's resized. Passes if there is a whole green circle.
12 <canvas id="canvas" width="500" height="500"></canvas>
14 <script src="resources/text-based-repaint.js"></script>
15 <script>
16 function repaintTest() {
17 document.getElementById('canvas').style.width = '500px';
19 onload = runRepaintTest;
21 var ctx = document.getElementById('canvas').getContext('2d');
22 ctx.beginPath();
23 ctx.arc(250, 250, 250, 0, 2 * Math.PI);
24 ctx.fillStyle = 'green';
25 ctx.fill();
26 </script>