Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(612)

Side by Side Diff: LayoutTests/fast/workers/resources/worker-timeout-order.js

Issue 563203002: [Blink-WebWorkers] WorkerSharedTimer cancels extra delayed tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added layout tests. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/workers/worker-timeout-order.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 self.postMessage("Test started.");
2 // The test will create timeouts in the following order
3 // on first message - 1s, 2s.
4 // on second message - 2s, 1s.
5 // on third and final message - 3s, 2s, 1s.
6 // if the timeouts in order then the test is PASS.
7 self.addEventListener('message', function(e) {
8 if(e.data == "TS1") {
9 setTimeout(function () { postMessage(1); }, 100);
jochen (gone - plz use gerrit) 2014/09/17 14:47:39 can you use lower timeouts 5, 10, 15? so the test
Mayur Kankanwadi 2014/09/18 14:34:25 Done.
10 setTimeout(function () { postMessage(2); }, 200);
11 setTimeout(function () { postMessage(3); }, 300);
12 }
13 else if(e.data == "TS2") {
14 setTimeout(function () { postMessage(3); postMessage("DONE"); }, 300);
15 setTimeout(function () { postMessage(2); }, 200);
16 setTimeout(function () { postMessage(1); }, 100);
17 }
18 }, false);
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/workers/worker-timeout-order.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698