summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow.html')
-rw-r--r--testing/web-platform/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow.html b/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow.html
new file mode 100644
index 0000000000..fac2c2e8f7
--- /dev/null
+++ b/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+ <link rel="match" href="image-loading-lazy-slow-ref.html">
+ <link rel="author" title="Chris Harrelson" href="mailto:chrishtr@chromium.org">
+ <link rel="help" href="https://html.spec.whatwg.org/multipage/#the-img-element">
+
+ <script src="/common/reftest-wait.js"></script>
+ <img id=target loading="lazy"
+ width="330" height="254" style="border: 1px solid black">
+<script>
+ let loaded = false;
+ target.onload = () => {
+ if (loaded) return;
+ loaded = true;
+ target.src = "";
+ requestAnimationFrame(() => requestAnimationFrame(() => {
+ target.src = "resources/image.png?loading-lazy-slow&pipe=trickle(d2)";
+ takeScreenshot();
+ }));
+ };
+ target.src = "resources/image.png?loading-lazy-slow";
+</script>