Index: LayoutTests/paint/invalidation/spv2/canvas-resize-no-full-invalidation.html |
diff --git a/LayoutTests/fast/repaint/canvas-resize-no-full-invalidation.html b/LayoutTests/paint/invalidation/spv2/canvas-resize-no-full-invalidation.html |
similarity index 60% |
copy from LayoutTests/fast/repaint/canvas-resize-no-full-invalidation.html |
copy to LayoutTests/paint/invalidation/spv2/canvas-resize-no-full-invalidation.html |
index 8f7924d1bbfcb71bf19856aa8e2311c68c3bf193..f0c1a7bc92634adcb1ce3452404f21d9a8f00940 100644 |
--- a/LayoutTests/fast/repaint/canvas-resize-no-full-invalidation.html |
+++ b/LayoutTests/paint/invalidation/spv2/canvas-resize-no-full-invalidation.html |
@@ -1,3 +1,4 @@ |
+<!-- Based on fast/repaint/canvas-resize-no-full-invalidation.html --> |
<!DOCTYPE html> |
<style> |
canvas { |
@@ -7,7 +8,10 @@ canvas { |
top: 50px; |
left: 50px; |
/* object-fit and object-position make the content of the canvas not affected |
- by the resize in repaintTest(). */ |
+ window.expectedPaintInvalidationObjects = [ |
+ "LayoutHTMLCanvas (positioned) CANVAS id='canvas'", |
+ ]; |
+ by the resize in paintInvalidationTest(). */ |
object-fit: contain; |
object-position: 0 0; |
background-color: #030; |
@@ -16,12 +20,15 @@ canvas { |
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. |
<canvas id="canvas" width="500" height="500"></canvas> |
-<script src="resources/text-based-repaint.js"></script> |
+<script src="resources/paint-invalidation-test.js"></script> |
<script> |
-function repaintTest() { |
+ window.expectedPaintInvalidationObjects = [ |
+ "LayoutHTMLCanvas (positioned) CANVAS id='canvas'", |
+ ]; |
+function paintInvalidationTest() { |
document.getElementById('canvas').style.width = '500px'; |
} |
-onload = runRepaintTest; |
+onload = runPaintInvalidationTest; |
var ctx = document.getElementById('canvas').getContext('2d'); |
ctx.beginPath(); |