diff --git a/layout/base/tests/test_image_layers.html b/layout/base/tests/test_image_layers.html index 9bcf57f8f41..0c915f1bd5a 100644 --- a/layout/base/tests/test_image_layers.html +++ b/layout/base/tests/test_image_layers.html @@ -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() {