| 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
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0d3333eb107804a55c56c3bbdd7d5114e568d00e
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-background-offscreen-firstline.html
|
| @@ -0,0 +1,35 @@
|
| +<!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">
|
| +
|
| +<script src="../../resources/run-after-layout-and-paint.js"></script>
|
| +<script>
|
| +// Similar to animated-gif-background-offscreen.html except that the element also
|
| +// has first-line style. Passes if no assertion failure.
|
| +
|
| +if (window.testRunner) {
|
| + testRunner.dumpAsText();
|
| + testRunner.waitUntilDone();
|
| +}
|
| +
|
| +function targetImageOnload() {
|
| + window.scrollTo(0, 100);
|
| + runAfterLayoutAndPaint(function() {
|
| + setTimeout(function() {
|
| + if (window.testRunner)
|
| + testRunner.notifyDone();
|
| + }, 150);
|
| + });
|
| +}
|
| +
|
| +onload = function() {
|
| + targetImage.style.background = "url(../../fast/backgrounds/resources/red-green-animated.gif)";
|
| +
|
| + // Use a parallel image element as a hack to detect whether the image has loaded, and therefore
|
| + // we'll get a frame.
|
| + testTarget.onload = targetImageOnload;
|
| + testTarget.src = "../../fast/backgrounds/resources/red-green-animated.gif";
|
| +}
|
| +</script>
|
|
|