image-loading-lazy-in-script-disabled-iframe.html (756B)
1 <!DOCTYPE html> 2 <head> 3 <title>Images with loading='lazy' in script disabled iframe are not handled 4 as 'lazy'</title> 5 <link rel="help" href="https://github.com/scott-little/lazyload"> 6 <script src="/resources/testharness.js"></script> 7 <script src="/resources/testharnessreport.js"></script> 8 </head> 9 10 <div style="height:1000vh;"></div> 11 <iframe id="iframe" sandbox="allow-same-origin" 12 src="resources/image-loading-lazy-in-viewport.html"> 13 </iframe> 14 <script> 15 promise_test(async t => { 16 await new Promise(resolve => iframe.addEventListener("load", resolve)); 17 18 const image = iframe.contentDocument.querySelector("img"); 19 20 assert_true(image.complete, 21 "lazy-load image shouldn't be honored in script disabled iframe"); 22 }); 23 </script>