Upstream version 11.40.271.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / workers / resources / worker-timeout-cancel-order.js
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);
7     clearTimeout(t1);
8 }, false);