summaryrefslogtreecommitdiffstats
path: root/devtools/shared/webconsole/test/console-test-worker.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/shared/webconsole/test/console-test-worker.js')
-rw-r--r--devtools/shared/webconsole/test/console-test-worker.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/devtools/shared/webconsole/test/console-test-worker.js b/devtools/shared/webconsole/test/console-test-worker.js
new file mode 100644
index 000000000..881eab0b8
--- /dev/null
+++ b/devtools/shared/webconsole/test/console-test-worker.js
@@ -0,0 +1,16 @@
+"use strict";
+
+function f() {
+ var a = 1;
+ var b = 2;
+ var c = 3;
+}
+
+self.onmessage = function (event) {
+ if (event.data == "ping") {
+ f();
+ postMessage("pong");
+ }
+};
+
+postMessage("load");