summaryrefslogtreecommitdiffstats
path: root/devtools/server/tests/browser/test-setup-in-parent.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/server/tests/browser/test-setup-in-parent.js')
-rw-r--r--devtools/server/tests/browser/test-setup-in-parent.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/devtools/server/tests/browser/test-setup-in-parent.js b/devtools/server/tests/browser/test-setup-in-parent.js
new file mode 100644
index 0000000000..2d2d9858b2
--- /dev/null
+++ b/devtools/server/tests/browser/test-setup-in-parent.js
@@ -0,0 +1,33 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+const protocol = require("devtools/shared/protocol");
+const { FrontClassWithSpec } = protocol;
+
+const spec = protocol.generateActorSpec({
+ typeName: "testSetupInParent",
+
+ methods: {
+ callSetupInParent: {
+ request: {},
+ response: {},
+ },
+ },
+});
+
+exports.TestSetupInParentActor = protocol.ActorClassWithSpec(spec, {
+ callSetupInParent: async function() {
+ // eslint-disable-next-line no-restricted-properties
+ this.conn.setupInParent({
+ module:
+ "chrome://mochitests/content/browser/devtools/server/tests/browser/setup-in-parent.js",
+ setupParent: "setupParent",
+ args: [{ one: true }, 2, "three"],
+ });
+ },
+});
+
+class TestSetupInParentFront extends FrontClassWithSpec(spec) {}
+exports.TestSetupInParentFront = TestSetupInParentFront;