test_promise_and_timeout_ordering_workers.html (574B)
1 <!DOCTYPE html> 2 <meta charset=utf-8> 3 <title>Test for promise and timeout ordering in workers</title> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <div id="log"></div> 7 <script> 8 /* global async_test, assert_equals */ 9 var t = async_test("Promise callbacks in workers should run immediately after the setTimeout handler that enqueues them"); 10 var w = new Worker("file_promise_and_timeout_ordering.js"); 11 w.onmessage = t.step_func_done(function(e) { 12 assert_equals(e.data, "t1start, t1end, promise, t2"); 13 }); 14 </script>