disconnected-image-loading-lazy.html (1084B)
1 <!DOCTYPE html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <body> 5 <script> 6 async_test(t => { 7 x = new Image(); 8 x.loading = "auto"; 9 x.src = "resources/image.png?auto"; 10 x.onload = t.step_func_done(); 11 t.step_timeout(t.unreached_func("Disconnected loading=auto image loads " + 12 "successfully, and doesn't timeout"), 2000); 13 }, "loading=auto for disconnected image"); 14 15 async_test(t => { 16 x = new Image(); 17 x.loading = "eager"; 18 x.src = "resources/image.png?eager"; 19 x.onload = t.step_func_done(); 20 t.step_timeout(t.unreached_func("Disconnected loading=eager image loads " + 21 "successfully, and doesn't timeout"), 2000); 22 }, "loading=eager for disconnected image"); 23 24 async_test(t => { 25 x = new Image(); 26 x.loading = "lazy"; 27 x.src = "resources/image.png?lazy"; 28 x.onload = t.unreached_func("Disconnected loading=lazy image loads lazily."); 29 t.step_timeout(t.step_func_done(), 2000); 30 }, "loading=lazy for disconnected image"); 31 </script> 32 </body>