Bug 1042642 - Do not pass the threadClient to EnvironmentClient during instantiation in tests; r=jdescottes

r=jdescottes

turns out we were incorrectly passing the threadClient to the environmentClient while
instantiating in one of the tests. It worked before because the threadClient exposed the API surface
of the debugger-client.

Differential Revision: https://phabricator.services.mozilla.com/D32685

--HG--
extra : moz-landing-system : lando
This commit is contained in:
yulia 2019-05-30 09:02:03 +00:00
parent ae4a4c8517
commit fd9524f7ff

View file

@ -42,15 +42,15 @@ function test_banana_environment() {
const grandpa = parent.parent;
Assert.equal(grandpa.type, "function");
const envClient = new EnvironmentClient(gThreadClient, environment);
const envClient = new EnvironmentClient(gClient, environment);
envClient.getBindings(response => {
Assert.equal(response.bindings.arguments[0].z.value, "z");
const parentClient = new EnvironmentClient(gThreadClient, parent);
const parentClient = new EnvironmentClient(gClient, parent);
parentClient.getBindings(response => {
Assert.equal(response.bindings.variables.banana3.value.class, "Function");
const grandpaClient = new EnvironmentClient(gThreadClient, grandpa);
const grandpaClient = new EnvironmentClient(gClient, grandpa);
grandpaClient.getBindings(response => {
Assert.equal(response.bindings.arguments[0].y.value, "y");
gThreadClient.resume().then(() => finishClient(gClient));