Files
firefox/devtools/shared/resources/tests/head.js
T
Alexandre Poirot 32f9eb3c1e Bug 1471754 - Implement the TargetList component. r=jdescottes
This component will help build and maintain the list of all the Targets.
Making it easier to:
* listen for all the targets: TargetList.watchTargets/unwatchTargets,
* iterate over all the existing ones: TargetList.getAllTargets,
* get all the TargetScoped fronts of all the targets: TargetList.getAllFronts.

Differential Revision: https://phabricator.services.mozilla.com/D48857
2019-11-04 11:03:58 +00:00

30 lines
993 B
JavaScript

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
/* eslint no-unused-vars: [2, {"vars": "local"}] */
/* import-globals-from ../../../client/shared/test/shared-head.js */
Services.scriptloader.loadSubScript(
"chrome://mochitests/content/browser/devtools/client/shared/test/shared-head.js",
this
);
const { DebuggerClient } = require("devtools/shared/client/debugger-client");
const { DebuggerServer } = require("devtools/server/debugger-server");
async function createLocalClient() {
// Instantiate a minimal server
DebuggerServer.init();
DebuggerServer.allowChromeProcess = true;
if (!DebuggerServer.createRootActor) {
DebuggerServer.registerAllActors();
}
const transport = DebuggerServer.connectPipe();
const client = new DebuggerClient(transport);
await client.connect();
return client;
}