image-srcset-default-src-2x.html 720 B

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