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

Unified Diff: third_party/WebKit/LayoutTests/paint/invalidation/animated-png-background.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-background.html
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/animated-png-background.html b/third_party/WebKit/LayoutTests/paint/invalidation/animated-png-background.html
new file mode 100644
index 0000000000000000000000000000000000000000..a988b284d81dab0b8e72a35dafb917e6098f7544
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/animated-png-background.html
@@ -0,0 +1,27 @@
+<!doctype HTML>
+<body>
+<div style="height: 2000px; width: 2000px;">
+ <div id="targetImage" style="width: 50px; height: 50px"></div>
+ <img id="testTarget" style="visibility: hidden">
+</div>
+<script src="resources/text-based-repaint.js"></script>
+<script>
+window.testIsAsync = true;
+
+function repaintTest() {
+ if (window.internals)
+ internals.advanceImageAnimation(testTarget);
+ requestAnimationFrame(function() {
+ finishRepaintTest();
+ });
+}
+
+onload = function() {
+ targetImage.style.background = "url(../../fast/backgrounds/resources/red-green-animated.png)";
+
+ // Use a parallel image element has a hack to detect whether the image has loaded, and therefore
+ // we'll get a frame.
+ testTarget.onload = runRepaintTest;
+ testTarget.src = "../../fast/backgrounds/resources/red-green-animated.png";
+}
+</script>

Powered by Google App Engine
This is Rietveld 408576698