summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/WorkerDebuggerGlobalScope.enterEventLoop_worker.js
diff options
context:
space:
mode:
Diffstat (limited to 'dom/workers/test/WorkerDebuggerGlobalScope.enterEventLoop_worker.js')
-rw-r--r--dom/workers/test/WorkerDebuggerGlobalScope.enterEventLoop_worker.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/dom/workers/test/WorkerDebuggerGlobalScope.enterEventLoop_worker.js b/dom/workers/test/WorkerDebuggerGlobalScope.enterEventLoop_worker.js
new file mode 100644
index 000000000..c43738516
--- /dev/null
+++ b/dom/workers/test/WorkerDebuggerGlobalScope.enterEventLoop_worker.js
@@ -0,0 +1,25 @@
+"use strict";
+
+function f() {
+ debugger;
+}
+
+var worker = new Worker("WorkerDebuggerGlobalScope.enterEventLoop_childWorker.js");
+
+worker.onmessage = function (event) {
+ postMessage("child:" + event.data);
+};
+
+self.onmessage = function (event) {
+ var message = event.data;
+ if (message.indexOf(":") >= 0) {
+ worker.postMessage(message.split(":")[1]);
+ return;
+ }
+ switch (message) {
+ case "ping":
+ debugger;
+ postMessage("pong");
+ break;
+ };
+};