Index: LayoutTests/inspector-protocol/debugger/resources/dedicated-worker-loop.js |
diff --git a/LayoutTests/inspector-protocol/debugger/resources/dedicated-worker-loop.js b/LayoutTests/inspector-protocol/debugger/resources/dedicated-worker-loop.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4321980a7053676025dc36345df22add1bead216 |
--- /dev/null |
+++ b/LayoutTests/inspector-protocol/debugger/resources/dedicated-worker-loop.js |
@@ -0,0 +1,17 @@ |
+var message_id = 1; |
+onmessage = function(event) { |
+ doWork(); |
+}; |
+ |
+function doWork() { |
+ postMessage("Message #" + message_id++); |
+ |
+ var ts = Date.now(); |
+ while (true) { |
+ if (Date.now() - ts > 1000) { |
+ ts = Date.now(); |
+ postMessage("Message #" + message_id++); |
+ } |
+ } |
+} |
+ |