Bug 852413 - Make test_image_layers.html wait for its image to load. r=mattwoodrow

--HG--
extra : rebase_source : 8be901e5932e8779bfcc4077de0108fd36acc6ec
This commit is contained in:
Joe Drew 2013-03-19 16:01:30 -04:00
parent 878e85a5c8
commit b7dd030514

View File

@ -21,13 +21,15 @@ var image = document.getElementById("image");
var lastPaintCount;
function changeImage() {
lastPaintCount = window.mozPaintCount;
var utils = SpecialPowers.getDOMWindowUtils(window);
utils.checkAndClearPaintedState(image);
image.src = "./image_rrgg-256x256.png";
checkDone();
image.onload = function() {
lastPaintCount = window.mozPaintCount;
document.body.style.background = "black";
checkDone();
}
}
function checkDone() {