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 daa0ea8330
commit 646f9c9334

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() {