image-srcset-default-src-1x.html (720B)
1 <!DOCTYPE html> 2 <html reftest-zoom="1" class="reftest-wait"> 3 <head> 4 5 <script type="application/javascript"> 6 // reftest-zoom is only applied at onload, so ensure the source-selection 7 // has happened after that 8 function clearWait() { 9 document.documentElement.classList.remove("reftest-wait"); 10 } 11 window.addEventListener("load", function() { 12 setTimeout(function() { 13 var img = document.querySelector("img"); 14 img.onload = clearWait; 15 img.onerror = clearWait; 16 img.src = img.src; 17 }, 0); 18 }); 19 </script> 20 </head> 21 <body> 22 <img srcset="200.png 2x" src="50.png"> 23 <p>Test default source provided in src, with no default/1x in srcset</p> 24 </body> 25 </html>