9 /* object-fit and object-position make the content of the canvas not affected
10 by the resize in repaintTest(). */
13 background-color: #
030;
16 Tests paint invalidation of canvas when it's resized which doesn't affect its contents. Passes if there is only incremental invalidation for the resized background.
17 <canvas id=
"canvas" width=
"500" height=
"500"></canvas>
19 <script src=
"resources/text-based-repaint.js"></script>
21 function repaintTest() {
22 document
.getElementById('canvas').style
.width
= '500px';
24 onload
= runRepaintTest
;
26 var ctx
= document
.getElementById('canvas').getContext('2d');
28 ctx
.arc(250, 250, 250, 0, 2 * Math
.PI
);
29 ctx
.fillStyle
= 'green';