image-outside-document-invalidate.html 656 B

12345678910111213141516171819202122232425
  1. <!--
  2. Any copyright is dedicated to the Public Domain.
  3. http://creativecommons.org/licenses/publicdomain/
  4. Test that document.mozSetImageElement() after an image load causes a repaint.
  5. -->
  6. <!DOCTYPE html>
  7. <html class="reftest-wait">
  8. <body style="background: -moz-element(#e) red">
  9. <script>
  10. window.addEventListener("MozReftestInvalidate", function () {
  11. var img = new Image();
  12. img.src = "data:image/gif;base64,R0lGODlhAQABAID/AP///wAAACwAAAAAAQABAAACAkQBADs="; /* 1x1 white gif */
  13. document.mozSetImageElement("e", img);
  14. img.onload = function () {
  15. document.documentElement.className = "";
  16. };
  17. }, false);
  18. </script>
  19. </body>
  20. </html>