summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/disconnected-image-loading-lazy.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/semantics/embedded-content/the-img-element/disconnected-image-loading-lazy.html')
-rw-r--r--testing/web-platform/tests/html/semantics/embedded-content/the-img-element/disconnected-image-loading-lazy.html32
1 files changed, 32 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/disconnected-image-loading-lazy.html b/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/disconnected-image-loading-lazy.html
new file mode 100644
index 0000000000..fe6d79fe2a
--- /dev/null
+++ b/testing/web-platform/tests/html/semantics/embedded-content/the-img-element/disconnected-image-loading-lazy.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<body>
+<script>
+async_test(t => {
+ x = new Image();
+ x.loading = "auto";
+ x.src = "resources/image.png?auto";
+ x.onload = t.step_func_done();
+ t.step_timeout(t.unreached_func("Disconnected loading=auto image loads " +
+ "successfully, and doesn't timeout"), 2000);
+}, "loading=auto for disconnected image");
+
+async_test(t => {
+ x = new Image();
+ x.loading = "eager";
+ x.src = "resources/image.png?eager";
+ x.onload = t.step_func_done();
+ t.step_timeout(t.unreached_func("Disconnected loading=eager image loads " +
+ "successfully, and doesn't timeout"), 2000);
+}, "loading=eager for disconnected image");
+
+async_test(t => {
+ x = new Image();
+ x.loading = "lazy";
+ x.src = "resources/image.png?lazy";
+ x.onload = t.unreached_func("Disconnected loading=lazy image loads lazily.");
+ t.step_timeout(t.step_func_done(), 2000);
+}, "loading=lazy for disconnected image");
+</script>
+</body>