summaryrefslogtreecommitdiffstats
path: root/devtools/client/webconsole/test/browser/test-error-worker.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/webconsole/test/browser/test-error-worker.js')
-rw-r--r--devtools/client/webconsole/test/browser/test-error-worker.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/devtools/client/webconsole/test/browser/test-error-worker.js b/devtools/client/webconsole/test/browser/test-error-worker.js
new file mode 100644
index 0000000000..0dc46b4ec0
--- /dev/null
+++ b/devtools/client/webconsole/test/browser/test-error-worker.js
@@ -0,0 +1,20 @@
+"use strict";
+
+self.addEventListener("message", function onMessage({ data }) {
+ return foo(data);
+});
+
+var w = new Worker("test-error-worker2.js");
+w.postMessage({});
+
+function foo(data) {
+ switch (data) {
+ case 1:
+ throw new Error("hello");
+ case 2:
+ /* eslint-disable */
+ throw "there";
+ case 3:
+ throw new DOMException("dom");
+ }
+}