| 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() {
|
|
|