summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/workers/worker-call.html
blob: 7f0a0e0a9368359624d1b80dfe8158a08ef56c23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<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>