summaryrefslogtreecommitdiffstats
path: root/devtools/server/tests/browser/test-setup-in-parent.js
blob: 2d2d9858b265ae8e265c693e2768870710a0de47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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;