<body>
<p>Test calling functions from WorkerContext. Should print multiple SUCCESS lines, followed by DONE.</p>
<div id=result></div>
<script>

if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

function log(message)
{
    document.getElementById("result").innerHTML += message + "<br>";
}

var worker = new Worker("resources/worker-call.js");
worker.onmessage = function(event) {
    log(event.data);
    if (event.data == "DONE") {
        if (window.testRunner)
            testRunner.notifyDone();
    }
};
</script>
</body>
