blob: 2d96c4ca4f33f8a23ebc08ced1d17ef10849da6e [file] [log] [blame]
<script>
var updated = false;
var prevTime;
if (window.internals)
internals.settings.setImageAnimationPolicy("none");
if (window.testRunner)
testRunner.waitUntilDone();
function changeImage() {
document.getElementById("target").src = "animation-green.gif";
updated = true;
}
function finishTest() {
if (window.testRunner)
testRunner.notifyDone();
}
function imageLoaded() {
if (!updated)
return;
var img = document.getElementById("target");
if (window.internals)
internals.advanceTimeForImage(img, 0.1);
if (window.testRunner) {
testRunner.layoutAndPaintAsyncThen(function () {
window.requestAnimationFrame(finishTest);
});
}
}
</script>
<body onload="changeImage()">
<img id="target" src="animation-blue.gif" onload="imageLoaded()">
</body>