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">
8 testRunner.waitUntilDone();
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();