1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 /* globals require, exports, Services */
9 const { DevToolsServer } = require("devtools/server/devtools-server");
10 const { RootActor } = require("devtools/server/actors/root");
11 const { BrowserTabList } = require("devtools/server/actors/webbrowser");
12 const { ProcessActorList } = require("devtools/server/actors/process");
15 } = require("devtools/server/actors/utils/actor-registry");
18 * xpcshell-test (XPCST) specific actors.
23 * Construct a root actor appropriate for use in a server running xpcshell
24 * tests. <snip boilerplate> :)
26 function createRootActor(connection) {
28 tabList: new XPCSTTabList(connection),
29 processList: new ProcessActorList(),
30 globalActorFactories: ActorRegistry.globalActorFactories,
32 // If the user never switches to the "debugger" tab we might get a
33 // shutdown before we've attached.
34 Services.obs.notifyObservers(null, "xpcshell-test-devtools-shutdown");
37 return new RootActor(connection, parameters);
39 exports.createRootActor = createRootActor;
42 * A "stub" TabList implementation that provides no tabs.
44 class XPCSTTabList extends BrowserTabList {
46 return Promise.resolve([]);