object-image-display-none-loading.html (897B)
1 <!DOCTYPE html> 2 <link rel="help" href="https://crbug.com/41477900"> 3 <link rel="help" href="https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element"> 4 <!-- 5 Based on step 2 of the spec algorithm: 6 "... if the element is not being rendered, 7 then jump to the step below labeled fallback." 8 --> 9 10 <script src="/resources/testharness.js"></script> 11 <script src="/resources/testharnessreport.js"></script> 12 13 <script> 14 const t = async_test( 15 "Test that object image not displayed is not loaded unnecessarily." 16 ); 17 18 function obj_onload() { 19 t.unreached_func( 20 "Object image not displayed on screen should not load." 21 )(); 22 } 23 24 t.step_timeout(() => { 25 t.done(); 26 }, 2000); 27 </script> 28 29 <style> 30 #target { 31 display: none; 32 } 33 </style> 34 35 <object 36 data="/images/red.png" 37 id="target" 38 onload="obj_onload();" 39 type="image/png" 40 > 41 Fallback Text 42 </object>