Bug 1505175 - Refactor get_parent_process_actors to only create a DebuggerClient. r=yulia
authorAlexandre Poirot <poirot.alex@gmail.com>
Fri, 09 Nov 2018 09:38:40 +0000
changeset 445886 74dbfbf5624545e007b3c0ed9c456e1e9d91ebdb
parent 445885 702485851935a8b3efb62b5efd3b82543b5167a4
child 445887 47ae67e772a976fe7ce72d74110e990ba5df3196
push id109795
push userrmaries@mozilla.com
push dateMon, 12 Nov 2018 17:23:23 +0000
treeherdermozilla-inbound@ccc0ff898ca2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyulia
bugs1505175
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1505175 - Refactor get_parent_process_actors to only create a DebuggerClient. r=yulia MozReview-Commit-ID: ChcKTEaO80a Depends on D11152 Differential Revision: https://phabricator.services.mozilla.com/D11153
devtools/server/tests/unit/test_addon_reload.js
devtools/server/tests/unit/test_addons_actor.js
--- a/devtools/server/tests/unit/test_addon_reload.js
+++ b/devtools/server/tests/unit/test_addon_reload.js
@@ -49,19 +49,21 @@ async function reloadAddon(client, addon
 }
 
 function getSupportFile(path) {
   const allowMissing = false;
   return do_get_file(path, allowMissing);
 }
 
 add_task(async function testReloadExitedAddon() {
-  const client = await new Promise(resolve => {
-    get_parent_process_actors(client => resolve(client));
-  });
+  DebuggerServer.init();
+  DebuggerServer.registerAllActors();
+
+  const client = new DebuggerClient(DebuggerServer.connectPipe());
+  await client.connect();
 
   // Install our main add-on to trigger reloads on.
   const addonFile = getSupportFile("addons/web-extension");
   const [installedAddon] = await Promise.all([
     AddonManager.installTemporaryAddon(addonFile),
     promiseWebExtensionStartup(),
   ]);
 
--- a/devtools/server/tests/unit/test_addons_actor.js
+++ b/devtools/server/tests/unit/test_addons_actor.js
@@ -2,22 +2,21 @@
    http://creativecommons.org/publicdomain/zero/1.0/ */
 /* eslint-disable no-shadow */
 
 "use strict";
 
 startupAddonsManager();
 
 async function connect() {
-  const client = await new Promise(resolve => {
-    get_parent_process_actors(client => resolve(client));
-  });
-  const root = await listTabs(client);
-  const addonsActor = root.addonsActor;
-  ok(addonsActor, "Got AddonsActor instance");
+  DebuggerServer.init();
+  DebuggerServer.registerAllActors();
+
+  const client = new DebuggerClient(DebuggerServer.connectPipe());
+  await client.connect();
 
   const addons = await client.mainRoot.getFront("addons");
   return [client, addons];
 }
 
 add_task(async function testSuccessfulInstall() {
   const [client, addons] = await connect();