4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
5 <title>Canvas Incremental Repaint
</title>
6 <style type=
"text/css" media=
"screen">
10 border:
20px solid green;
12 background-color: green;
15 <script src=
"../../resources/run-after-layout-and-paint.js"></script>
16 <script type=
"text/javascript" charset=
"utf-8">
18 if (window.testRunner) {
19 testRunner.dumpAsTextWithPixelResults();
20 testRunner.waitUntilDone();
28 canvas = document.getElementById('canvas1');
29 ctx = canvas.getContext('
2d');
32 ctx.fillStyle = 'red';
33 ctx.fillRect(
0,
0,
300,
300);
34 runAfterLayoutAndPaint(repaintTest)
37 function repaintTest()
39 ctx.fillStyle = 'green';
40 ctx.fillRect(
0,
0,
300,
300);
41 if (window.testRunner) {
42 testRunner.notifyDone();
47 <body onload=
"beginTest()">
48 <p>Expect a solid green square below this text.
</p>
49 <canvas id=
"canvas1"></canvas>