Bug 1755973 - Try implied arr+[0] in GetUniformIndices. r=gfx-reviewers,bradwerth
[gecko.git] / testing / xpcshell / dbg-actors.js
blobf9a44f129578e4547d273640268a2363a739f0f1
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 */
7 "use strict";
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");
13 const {
14   ActorRegistry,
15 } = require("devtools/server/actors/utils/actor-registry");
17 /**
18  * xpcshell-test (XPCST) specific actors.
19  *
20  */
22 /**
23  * Construct a root actor appropriate for use in a server running xpcshell
24  * tests. <snip boilerplate> :)
25  */
26 function createRootActor(connection) {
27   let parameters = {
28     tabList: new XPCSTTabList(connection),
29     processList: new ProcessActorList(),
30     globalActorFactories: ActorRegistry.globalActorFactories,
31     onShutdown() {
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");
35     },
36   };
37   return new RootActor(connection, parameters);
39 exports.createRootActor = createRootActor;
41 /**
42  * A "stub" TabList implementation that provides no tabs.
43  */
44 class XPCSTTabList extends BrowserTabList {
45   getList() {
46     return Promise.resolve([]);
47   }