<img style="background-color: blue" >
<script>
if (window.testRunner) {
    testRunner.dumpAsText(true);
    testRunner.waitUntilDone();
}

function loadAndStall()
{
    return "http://127.0.0.1:8000/resources/load-and-stall.py";
}

function pngImage()
{
    return "?name=../../../fast/images/resources/dice.png&mimeType=image%2Fpng";
}

function testDone()
{
    if (window.testRunner)
        testRunner.notifyDone();
}

function runTest()
{
    document.querySelector("img").src = loadAndStall() + pngImage() + "&stallAt=43008&stallFor=1";
    setTimeout(testDone, 3000);
}

setTimeout(runTest, 0);
</script>
