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

Unified Diff: third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-background-offscreen-firstline.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-offscreen-firstline.html
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-background-offscreen-firstline.html b/third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-background-offscreen-firstline.html
index 0d3333eb107804a55c56c3bbdd7d5114e568d00e..a72040728170b5e6ee2500c224c9bcf3a13a4f39 100644
--- a/third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-background-offscreen-firstline.html
+++ b/third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-background-offscreen-firstline.html
@@ -1,27 +1,31 @@
<!doctype HTML>
<style>targetImage::first-line { color: yellow; }</style>
<div style="height: 2000px; width: 2000px;">
-<div id="targetImage" style="width: 50px; height: 50px">text text</div>
-<img id="testTarget" style="visibility: hidden">
+ <div id="targetImage" style="width: 50px; height: 50px">text text</div>
+ <img id="testTarget" style="visibility: hidden">
+</div>
-<script src="../../resources/run-after-layout-and-paint.js"></script>
+<script src="../../fast/repaint/resources/text-based-repaint.js"></script>
<script>
-// Similar to animated-gif-background-offscreen.html except that the element also
-// has first-line style. Passes if no assertion failure.
+window.testIsAsync = true;
-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
+// Disable under-invalidation checking because the "under-invalidation" of
+// offscreen gif animation is intentional.
+if (window.internals)
+ internals.runtimeFlags.paintUnderInvalidationCheckingEnabled = false;
+
+function repaintTest() {
+ if (window.internals)
+ internals.advanceImageAnimation(testTarget);
+ requestAnimationFrame(function() {
+ finishRepaintTest();
+ });
}
function targetImageOnload() {
- window.scrollTo(0, 100);
- runAfterLayoutAndPaint(function() {
- setTimeout(function() {
- if (window.testRunner)
- testRunner.notifyDone();
- }, 150);
- });
+ // Scroll targetImage offscreen.
+ window.scrollTo(0, 1000);
+ runRepaintTest();
}
onload = function() {

Powered by Google App Engine
This is Rietveld 408576698