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

Unified Diff: LayoutTests/fast/workers/resources/worker-timeout-cancel-order.js

Issue 563203002: [Blink-WebWorkers] WorkerSharedTimer cancels extra delayed tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix for Linux ASAN crash. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/workers/resources/worker-timeout-decreasing-order.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/workers/resources/worker-timeout-cancel-order.js
diff --git a/LayoutTests/fast/workers/resources/worker-timeout-cancel-order.js b/LayoutTests/fast/workers/resources/worker-timeout-cancel-order.js
new file mode 100644
index 0000000000000000000000000000000000000000..8334e71cdb0a7cf4b9736c9b45baa3b04ccc91a1
--- /dev/null
+++ b/LayoutTests/fast/workers/resources/worker-timeout-cancel-order.js
@@ -0,0 +1,8 @@
+self.postMessage("Test started.");
+// The test will create 3 timeouts with their intervals decreasing.
+// If the timeouts execute in order then the test is PASS.
+self.addEventListener('message', function(e) {
+ var t1 = setTimeout(function () { postMessage(1); }, 5);
+ setTimeout(function () { postMessage(2); postMessage("DONE"); }, 10);
+ clearTimeout(t1);
+}, false);
« no previous file with comments | « no previous file | LayoutTests/fast/workers/resources/worker-timeout-decreasing-order.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698