1 self.postMessage("Test started.");
2 // The test will create 3 timeouts with their intervals decreasing.
3 // If the timeouts execute in order then the test is PASS.
4 self.addEventListener('message', function(e) {
5 var t1 = setTimeout(function () { postMessage(1); }, 5);
6 setTimeout(function () { postMessage(2); postMessage("DONE"); }, 10);