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

Unified Diff: third_party/WebKit/LayoutTests/paint/invalidation/animated-png-offscreen.html

Issue 2793493002: Add paint invalidation tests for APNG images (Closed)
Patch Set: Created 3 years, 9 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: third_party/WebKit/LayoutTests/paint/invalidation/animated-png-offscreen.html
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/animated-png-offscreen.html b/third_party/WebKit/LayoutTests/paint/invalidation/animated-png-offscreen.html
new file mode 100644
index 0000000000000000000000000000000000000000..e671fca5f78b5aa04f2b563f3d78c2ac46dd8154
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/animated-png-offscreen.html
@@ -0,0 +1,33 @@
+<!doctype HTML>
+<body>
+<div style="height: 2000px; width: 2000px;">
+ <img id="targetImage">
+</div>
+<script src="resources/text-based-repaint.js"></script>
+<script>
+window.testIsAsync = true;
+
+// Disable under-invalidation checking because the "under-invalidation" of
+// offscreen apng animation is intentional.
+if (window.internals)
+ internals.runtimeFlags.paintUnderInvalidationCheckingEnabled = false;
+
+function repaintTest() {
+ if (window.internals)
+ internals.advanceImageAnimation(targetImage);
+ requestAnimationFrame(function() {
+ finishRepaintTest();
+ });
+}
+
+function targetImageOnload() {
+ // Scroll targetImage offscreen.
+ window.scrollTo(0, 1000);
+ runRepaintTest();
+}
+
+onload = function() {
+ targetImage.onload = targetImageOnload;
+ targetImage.src = "../../fast/backgrounds/resources/red-green-animated.png";
+}
+</script>

Powered by Google App Engine
This is Rietveld 408576698