diff options
Diffstat (limited to 'testing/web-platform/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow-aspect-ratio.html')
-rw-r--r-- | testing/web-platform/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow-aspect-ratio.html | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow-aspect-ratio.html b/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow-aspect-ratio.html new file mode 100644 index 0000000000..662ada6909 --- /dev/null +++ b/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-slow-aspect-ratio.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html class="reftest-wait"> + <link rel="match" href="image-loading-lazy-slow-aspect-ratio-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="200" height="100" style="width: 100px; height: auto; border: 1px solid black"> +<script> + let loaded = false; + target.onload = () => { + if (loaded) return; + loaded = true; + target.src = ""; + requestAnimationFrame(() => requestAnimationFrame(() => { + target.src = "resources/image.png?slow-aspect-ratio&pipe=trickle(d2)"; + takeScreenshot(); + })); + }; + target.src = "resources/image.png?slow-aspect-ratio"; +</script> |