<!doctype HTML>
<script>
function receiveMessage(e) {
if (e.data !== "pass") {
document.getElementById("error").innerHTML = "iframe decode failed.";
}
// Though the image has been decoded, it has not painted. Wait for a frame
// before informing the parent.
requestAnimationFrame(function() {
requestAnimationFrame(function() {
testRunner.notifyDone();
});
});
}
if (window.testRunner) {
testRunner.waitUntilDone();
window.addEventListener("message", receiveMessage, false);
}
</script>
<div id="error"></div>
<iframe frameborder=0 width=200px height=200px marginwidth=0 marginheight=0
src="http://localhost:8000/images/resources/image-decode-local.html"></iframe>