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