Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: LayoutTests/paint/invalidation/spv2/canvas-resize-no-full-invalidation.html

Issue 1302183007: Convert some text-based-repaint tests for spv2 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698