mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 02:40:22 -10:00
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
30 lines
993 B
JavaScript
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;
|
|
}
|