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

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

Issue 2319833002: Deflake paint/invalidation/animated-gif*.html (Closed)
Patch Set: Disable under-invalidation checking for offscreen gif animation Created 4 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: third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-background.html
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-background.html b/third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-background.html
index fe5509c482cc73176517a1a0bc9fc82ecca993d2..4dccaedee2f1ae8723e38fb5d18a006d894b6150 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-background.html
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-background.html
@@ -1,31 +1,27 @@
<!doctype HTML>
<body>
<div style="height: 2000px; width: 2000px;">
-<div id="targetImage" style="width: 50px; height: 50px">
+ <div id="targetImage" style="width: 50px; height: 50px"></div>
+ <img id="testTarget" style="visibility: hidden">
</div>
-<img id="testTarget" style="visibility: hidden">
<script src="../../fast/repaint/resources/text-based-repaint.js"></script>
<script>
window.testIsAsync = true;
function repaintTest() {
- window.internals.advanceImageAnimation(testTarget);
+ if (window.internals)
+ internals.advanceImageAnimation(testTarget);
requestAnimationFrame(function() {
finishRepaintTest();
});
}
-function targetImageOnload() {
- window.internals.startTrackingRepaints(document);
- runRepaintTest();
-}
-
onload = function() {
targetImage.style.background = "url(../../fast/backgrounds/resources/red-green-animated.gif)";
// Use a parallel image element has a hack to detect whether the image has loaded, and therefore
// we'll get a frame.
- testTarget.onload = targetImageOnload;
+ testTarget.onload = runRepaintTest;
testTarget.src = "../../fast/backgrounds/resources/red-green-animated.gif";
}
</script>

Powered by Google App Engine
This is Rietveld 408576698