summaryrefslogtreecommitdiffstats
path: root/dom/ipc/tests/JSWindowActor/browser_process_childid.js
blob: ba6db1dabb6a36c047e14dbe4eea4c9a05162726 (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
/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";

// Test that `process.childID` is defined.

declTest("test childid", {
  async test(browser) {
    let parent = browser.browsingContext.currentWindowGlobal;
    ok(
      parent.domProcess.childID,
      "parent domProcess.childID should have a value."
    );
    await SpecialPowers.spawn(
      browser,
      [parent.domProcess.childID],
      async function (parentChildID) {
        ok(
          ChromeUtils.domProcessChild.childID,
          "child process.childID should have a value."
        );
        let childID = ChromeUtils.domProcessChild.childID;
        is(parentChildID, childID);
      }
    );
  },
});