Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / canvas / canvas-partial-invalidation-zoomed.html
bloba3b0d8d663bbf828c3798946f9c0feb1809c9fec
1 <!DOCTYPE html>
2 <html>
3 <body style="zoom: 1.5">
4 <p>An all green square should appear below</p>
5 <canvas id="A" width=300 height=300></canvas>
6 <script type="text/javascript" charset="utf-8">
7 if (window.testRunner)
8 testRunner.waitUntilDone();
9 var context;
11 window.onload = function() {
12 context = document.getElementById("A").getContext("2d");
13 context.fillStyle = 'red';
14 context.fillRect(1, 1, 298, 298);
15 requestAnimationFrame(doUpdate1);
18 function doUpdate1() {
19 context.fillStyle = 'red';
20 context.fillRect(1, 1, 298, 298);
21 // We need to chain 2 rAFs because the first rAF may be called
22 // before the initial presentation.
23 requestAnimationFrame(doUpdate2);
26 function doUpdate2() {
27 context.fillStyle = 'green';
28 context.fillRect(1, 1, 298, 298);
29 testRunner.notifyDone();
32 </script>
33 </body>
34 </html>