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

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

Issue 2170073002: Fix check failure when an offscreen element has animated background and first-line style (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-background-offscreen-firstline-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-background-offscreen-firstline-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698