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 setTimeout(function () { postMessage(3); postMessage("DONE"); }, 15);
6 setTimeout(function () { postMessage(2); }, 10);
7 setTimeout(function () { postMessage(1); }, 5);