1 <!-- Based on fast/repaint/canvas-resize-no-full-invalidation.html -->
10 /* object-fit and object-position make the content of the canvas not affected
11 window.expectedPaintInvalidationObjects = [
12 "LayoutHTMLCanvas (positioned) CANVAS id='canvas'",
14 by the resize in paintInvalidationTest(). */
17 background-color: #
030;
20 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.
21 <canvas id=
"canvas" width=
"500" height=
"500"></canvas>
23 <script src=
"resources/paint-invalidation-test.js"></script>
25 window
.expectedPaintInvalidationObjects
= [
26 "LayoutHTMLCanvas (positioned) CANVAS id='canvas'",
28 function paintInvalidationTest() {
29 document
.getElementById('canvas').style
.width
= '500px';
31 onload
= runPaintInvalidationTest
;
33 var ctx
= document
.getElementById('canvas').getContext('2d');
35 ctx
.arc(250, 250, 250, 0, 2 * Math
.PI
);
36 ctx
.fillStyle
= 'green';