https://github.com/web-platform-tests/wpt
Revision 212f85de52dac234edf85e253e47b9d41abd0c6a authored by Frédéric Wang on 15 March 2018, 12:39:13 UTC, committed by GitHub on 15 March 2018, 12:39:13 UTC
1 parent df9060d
Raw File
Tip revision: 212f85de52dac234edf85e253e47b9d41abd0c6a authored by Frédéric Wang on 15 March 2018, 12:39:13 UTC
Add IDL test for the CSS Font Loading spec (#10049)
Tip revision: 212f85d
WorkerGlobalScope_setTimeout.htm
<!DOCTYPE html>
<title> WorkerGlobalScope API: setTimeout() </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("TimeoutHandler");
});
</script>
back to top