Revision 920625c0189a444b6c4f0ce44ca3d02d5921ee39 authored by Ms2ger on 06 April 2018, 07:56:32 UTC, committed by Ms2ger on 06 April 2018, 08:10:11 UTC
1 parent d6a82fd
WorkerGlobalScope_setInterval.htm
<!DOCTYPE html>
<title> WorkerGlobalScope API: setInterval() </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<script>
async_test(function(t) {
var result = [];
var worker = new Worker('./support/Timer.js');
worker.onmessage = t.step_func(function(e) {
result.push(e.data);
if (result.length == 3) {
assert_array_equals(result, ["hello", "worker", "worker"]);
worker.onmessage = t.unreached_func('Unexpected message event');
setTimeout(t.step_func_done(), 100);
}
});
worker.postMessage("IntervalHandler");
});
</script>
Computing file changes ...