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

Unified Diff: LayoutTests/paint/invalidation/animated-gif.html

Issue 1026823002: [S.P.] Don't draw frames of animated images that are offscreen (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « LayoutTests/VirtualTestSuites ('k') | LayoutTests/paint/invalidation/animated-gif-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/paint/invalidation/animated-gif.html
diff --git a/LayoutTests/paint/invalidation/animated-gif.html b/LayoutTests/paint/invalidation/animated-gif.html
new file mode 100644
index 0000000000000000000000000000000000000000..bfd63aba683b82ddbef0d131e5d9eb7c0ea04677
--- /dev/null
+++ b/LayoutTests/paint/invalidation/animated-gif.html
@@ -0,0 +1,29 @@
+<!doctype HTML>
+<body>
+<div style="height: 2000px; width: 2000px;">
+<img id="targetImage">
+</div>
+<script src="../../fast/repaint/resources/text-based-repaint.js"></script>
+<script>
+window.testIsAsync = true;
+
+// Tests that a repaint of the image occurs during the 200ms waiting period.
+
+function myfunc() {
+ testRunner.displayAsyncThen(finishRepaintTest);
+}
+
+function targetImageOnload() {
+ testRunner.displayAsyncThen(function() {
+ setTimeout(myfunc, 400); // The initial red frame of the GIF has a 100ms duration
+ });
+}
+
+function repaintTest() {
+ targetImage.onload = targetImageOnload;
+ targetImage.src="../../fast/backgrounds/resources/red-green-animated.gif";
+}
+
+runRepaintTest();
+
+</script>
« no previous file with comments | « LayoutTests/VirtualTestSuites ('k') | LayoutTests/paint/invalidation/animated-gif-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698