1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/image-element/image-outside-document-invalidate.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,24 @@ 1.4 +<!-- 1.5 + Any copyright is dedicated to the Public Domain. 1.6 + http://creativecommons.org/licenses/publicdomain/ 1.7 + 1.8 + Test that document.mozSetImageElement() after an image load causes a repaint. 1.9 +--> 1.10 +<!DOCTYPE html> 1.11 +<html class="reftest-wait"> 1.12 +<body style="background: -moz-element(#e) red"> 1.13 + 1.14 +<script> 1.15 + 1.16 +window.addEventListener("MozReftestInvalidate", function () { 1.17 + var img = new Image(); 1.18 + img.src = "data:image/gif;base64,R0lGODlhAQABAID/AP///wAAACwAAAAAAQABAAACAkQBADs="; /* 1x1 white gif */ 1.19 + document.mozSetImageElement("e", img); 1.20 + img.onload = function () { 1.21 + document.documentElement.className = ""; 1.22 + }; 1.23 +}, false); 1.24 + 1.25 +</script> 1.26 +</body> 1.27 +</html>