Bug 1494796 - fix timing issues in debugger tests due to threadClient refactor; r=jlast

There were a few miscellaneous situations in which the test would fail due to a hanging
request. These tests passed in the past because the old way of using the threadActor did not
identify which requests had been responded to.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
yulia 2019-06-12 23:34:00 +00:00
Родитель fd0cb8542e
Коммит 6d5d4fea40
45 изменённых файлов: 78 добавлений и 81 удалений

Просмотреть файл

@ -39,13 +39,15 @@ export function selectThread(cx: Context, thread: ThreadId) {
const threadcx = getThreadContext(getState());
assert(threadcx.thread == thread, "Thread mismatch");
dispatch(evaluateExpressions(threadcx));
const serverRequests = [];
serverRequests.push(dispatch(evaluateExpressions(threadcx)));
const frame = getSelectedFrame(getState(), thread);
if (frame) {
dispatch(selectLocation(threadcx, frame.location));
dispatch(fetchScopes(threadcx));
serverRequests.push(dispatch(selectLocation(threadcx, frame.location)));
serverRequests.push(dispatch(fetchScopes(threadcx)));
}
await Promise.all(serverRequests);
};
}

Просмотреть файл

@ -8,7 +8,7 @@ function skipPausing(dbg) {
}
/*
* Tests toggling the skip pausing button and
* Tests toggling the skip pausing button and
* invoking functions without pausing.
*/
@ -22,7 +22,7 @@ add_task(async function() {
is(res, 3, "simple() successfully completed");
info("Reload and invoke again");
reload(dbg, "simple3");
await reload(dbg, "simple3");
res = await invokeInTab("simple");
is(res, 3, "simple() successfully completed");
});

Просмотреть файл

@ -22,10 +22,11 @@ add_task(async function() {
// Click the call stack to get to debugger-line-1
await clickElement(dbg, "frame", 2);
await waitForRequestsToSettle(dbg);
await waitForSelectedSource(dbg, "simple1.js");
// Resume, which ends all pausing and would trigger the problem
resume(dbg);
await resume(dbg);
// Select the source that had the initial debug line
await selectSource(dbg, "simple2.js");
@ -36,4 +37,4 @@ add_task(async function() {
0,
"Debug line no longer exists!"
);
});
});

Просмотреть файл

@ -139,6 +139,7 @@ add_task(async function() {
pageValue = await getPageValue(tab);
is(pageValue, "let x = 5;", "Content loads from network, has doc value 5");
await waitForLoadedSource(dbg, "inline-cache.html");
await waitForSelectedSource(dbg, "inline-cache.html");
dbgValue = findSourceContent(dbg, "inline-cache.html");
info(`Debugger text: ${dbgValue.value}`);
ok(

Просмотреть файл

@ -48,6 +48,8 @@ add_task(async function() {
// Test that the current select source persists across reloads
await selectSource(dbg, "long.js");
await waitForRequestsToSettle(dbg);
await reload(dbg, "long.js");
await waitForSelectedSource(dbg, "long.js");

Просмотреть файл

@ -49,6 +49,8 @@ add_task(async function() {
ok(true, "paused at unmapped breakpoint");
await waitForState(dbg, state => dbg.selectors.getBreakpointCount(state) == 2);
ok(true, "unmapped breakpoints shown in UI");
await waitForRequestsToSettle(dbg);
await toolbox.destroy();
});
// Test that if we show a breakpoint with an old generated location, it is
@ -87,4 +89,5 @@ add_task(async function() {
&& bps[0].location.line == 15;
});
ok(true, "removed old breakpoint during sync");
await waitForRequestsToSettle(dbg);
});

Просмотреть файл

@ -15,6 +15,7 @@ add_task(async function() {
dbg.client.waitForWorkers(true);
await selectSource(dbg, "simple-worker.js");
await waitForSelectedSource(dbg, "simple-worker.js");
await addBreakpoint(dbg, workerSource, 1);
invokeInTab("startWorker");
await waitForPaused(dbg, "simple-worker.js");

Просмотреть файл

@ -121,7 +121,7 @@ add_task(async function() {
assertPausedAtSourceAndLine(dbg, workerSource.id, 10);
info("View the second paused thread");
dbg.actions.selectThread(getContext(dbg), thread2);
await dbg.actions.selectThread(getContext(dbg), thread2);
threadIsSelected(dbg, 3);
await waitForPaused(dbg);
assertPausedAtSourceAndLine(dbg, workerSource.id, 10);
@ -129,6 +129,6 @@ add_task(async function() {
info("StepOver in second worker and not the first");
await stepOver(dbg);
assertPausedAtSourceAndLine(dbg, workerSource.id, 11);
dbg.actions.selectThread(getContext(dbg), thread1);
await dbg.actions.selectThread(getContext(dbg), thread1);
assertPausedAtSourceAndLine(dbg, workerSource.id, 10);
});

Просмотреть файл

@ -92,4 +92,5 @@ add_task(async function() {
await toggleNode(dbg, "0");
ok(findNodeValue(dbg, "foo"), "foo");
await toggleNode(dbg, "var_weakset");
await waitForRequestsToSettle(dbg);
});

Просмотреть файл

@ -184,6 +184,10 @@ async function waitForElementWithSelector(dbg, selector) {
return findElementWithSelector(dbg, selector);
}
function waitForRequestsToSettle(dbg) {
return dbg.toolbox.target.client.waitForRequestsToSettle();
}
function assertClass(el, className, exists = true) {
if (exists) {
ok(el.classList.contains(className), `${className} class exists`);

Просмотреть файл

@ -25,7 +25,9 @@ add_task(async function() {
await waitFor(() => findMessages(hud, "").length === INITIAL_LOGS_NUMBER);
ok(true, "Messages showed up initially");
const onReloaded = hud.ui.once("reloaded");
await refreshTab();
await onReloaded;
await waitFor(() => findMessages(hud, "").length === 0);
ok(true, "Messages disappeared");
@ -48,8 +50,10 @@ add_task(async function() {
ok(true, "Messages showed up initially");
const onNavigatedMessage = waitForMessage(hud, "Navigated to");
const onReloaded = hud.ui.once("reloaded");
refreshTab();
await onNavigatedMessage;
await onReloaded;
ok(true, "Navigation message appeared as expected");
is(findMessages(hud, "").length, INITIAL_LOGS_NUMBER + 1,
@ -66,4 +70,5 @@ add_task(async function() {
ok(resultMessage > commandMessage
&& resultMessage < Date.now(),
"The result has a timestamp newer than the command and older than current time");
await closeToolbox();
});

Просмотреть файл

@ -88,7 +88,7 @@ function test_black_box_breakpoint() {
async function test_unblack_box_breakpoint(sourceFront) {
await unBlackBox(sourceFront);
gThreadClient.once("paused", function(packet) {
gThreadClient.once("paused", async function(packet) {
Assert.equal(packet.why.type, "breakpoint",
"We should hit the breakpoint again");
@ -101,7 +101,7 @@ async function test_unblack_box_breakpoint(sourceFront) {
finishClient(gClient);
}
);
gThreadClient.resume();
await gThreadClient.resume();
});
gDebuggee.runTest();
}

Просмотреть файл

@ -88,9 +88,10 @@ async function test_black_box_dbg_statement() {
async function test_unblack_box_dbg_statement(sourceFront) {
await unBlackBox(sourceFront);
gThreadClient.once("paused", function(packet) {
gThreadClient.once("paused", async function(packet) {
Assert.equal(packet.why.type, "debuggerStatement",
"We should stop at the debugger statement again");
await gThreadClient.resume();
finishClient(gClient);
});
gDebuggee.runTest();

Просмотреть файл

@ -80,6 +80,7 @@ function test_black_box_exception() {
Assert.equal(source.url, SOURCE_URL,
"We shouldn't pause while in the black boxed source.");
await gThreadClient.resume();
finishClient(gClient);
});

Просмотреть файл

@ -41,6 +41,7 @@ const testBlackBox = async function() {
const regularSource = sources.filter(s => s.url === SOURCE_URL)[0];
equal(regularSource.isBlackBoxed, false);
await gThreadClient.resume();
finishClient(gClient);
};

Просмотреть файл

@ -8,7 +8,7 @@
*/
async function testFinish({threadClient, debuggerClient}) {
await resume(threadClient);
await threadClient.resume();
await close(debuggerClient);
do_test_finished();
@ -37,15 +37,15 @@ function run_test() {
// 1. lets blackbox function a, and assert that we pause in b
const range = {start: { line: 6, column: 0 }, end: { line: 8, colum: 1 }};
blackBox(sourceFront, range);
resume(threadClient);
await threadClient.resume();
const paused = await waitForPause(threadClient);
equal(paused.frame.where.line, 11, "paused inside of b");
await resume(threadClient);
await threadClient.resume();
// 2. lets unblackbox function a, and assert that we pause in a
unBlackBox(sourceFront, range);
await invokeAndPause(dbg, `chaining()`);
resume(threadClient);
await threadClient.resume();
const paused2 = await waitForPause(threadClient);
equal(paused2.frame.where.line, 7, "paused inside of a");

Просмотреть файл

@ -8,7 +8,7 @@
* Check that setting breakpoints when the debuggee is running works.
*/
add_task(threadClientTest(({ threadClient, debuggee }) => {
add_task(threadClientTest(({ threadClient, client, debuggee }) => {
return new Promise((resolve) => {
threadClient.once("paused", async function(packet) {
const source = await getSourceById(
@ -17,7 +17,7 @@ add_task(threadClientTest(({ threadClient, debuggee }) => {
);
const location = { sourceUrl: source.url, line: debuggee.line0 + 3 };
threadClient.resume();
await threadClient.resume();
// Setting the breakpoint later should interrupt the debuggee.
threadClient.once("paused", function(packet) {
@ -26,6 +26,7 @@ add_task(threadClientTest(({ threadClient, debuggee }) => {
});
threadClient.setBreakpoint(location, {});
await client.waitForRequestsToSettle();
executeSoon(resolve);
});

Просмотреть файл

@ -8,7 +8,7 @@
* Check that setting a breakpoint in a line in a child script works.
*/
add_task(threadClientTest(({ threadClient, debuggee }) => {
add_task(threadClientTest(({ threadClient, client, debuggee }) => {
return new Promise(resolve => {
threadClient.once("paused", async function(packet) {
const source = await getSourceById(
@ -18,10 +18,10 @@ add_task(threadClientTest(({ threadClient, debuggee }) => {
const location = { sourceUrl: source.url, line: debuggee.line0 + 3 };
threadClient.setBreakpoint(location, {});
await client.waitForRequestsToSettle();
threadClient.once("paused", function(packet) {
threadClient.once("paused", async function(packet) {
// Check the return value.
Assert.equal(packet.type, "paused");
Assert.equal(packet.frame.where.actor, source.actor);
Assert.equal(packet.frame.where.line, location.line);
Assert.equal(packet.why.type, "breakpoint");
@ -31,11 +31,12 @@ add_task(threadClientTest(({ threadClient, debuggee }) => {
// Remove the breakpoint.
threadClient.removeBreakpoint(location);
await client.waitForRequestsToSettle();
threadClient.resume().then(resolve);
});
// Continue until the breakpoint is hit.
threadClient.resume();
await threadClient.resume();
});
/* eslint-disable */

Просмотреть файл

@ -8,7 +8,7 @@
* Check that removing a breakpoint works.
*/
add_task(threadClientTest(({ threadClient, debuggee }) => {
add_task(threadClientTest(({ threadClient, client, debuggee }) => {
return new Promise(resolve => {
let done = false;
threadClient.once("paused", async function(packet) {
@ -19,9 +19,9 @@ add_task(threadClientTest(({ threadClient, debuggee }) => {
const location = { sourceUrl: source.url, line: debuggee.line0 + 2 };
threadClient.setBreakpoint(location, {});
threadClient.once("paused", function(packet) {
await client.waitForRequestsToSettle();
threadClient.once("paused", async function(packet) {
// Check the return value.
Assert.equal(packet.type, "paused");
Assert.equal(packet.frame.where.actor, source.actorID);
Assert.equal(packet.frame.where.line, location.line);
Assert.equal(packet.why.type, "breakpoint");
@ -30,6 +30,7 @@ add_task(threadClientTest(({ threadClient, debuggee }) => {
// Remove the breakpoint.
threadClient.removeBreakpoint(location);
await client.waitForRequestsToSettle();
done = true;
threadClient.once("paused", function(packet) {
// The breakpoint should not be hit again.
@ -37,11 +38,12 @@ add_task(threadClientTest(({ threadClient, debuggee }) => {
Assert.ok(false);
});
});
threadClient.resume();
await threadClient.resume();
resolve();
});
// Continue until the breakpoint is hit.
threadClient.resume();
await threadClient.resume();
});
/* eslint-disable */
@ -59,6 +61,5 @@ add_task(threadClientTest(({ threadClient, debuggee }) => {
if (!done) {
Assert.ok(false);
}
resolve();
});
}));

Просмотреть файл

@ -9,7 +9,7 @@
* triggers no matter which entry point we reach.
*/
add_task(threadClientTest(({ threadClient, debuggee }) => {
add_task(threadClientTest(({ threadClient, client, debuggee }) => {
return new Promise(resolve => {
threadClient.once("paused", async function(packet) {
const source = await getSourceById(
@ -23,16 +23,17 @@ add_task(threadClientTest(({ threadClient, debuggee }) => {
};
threadClient.setBreakpoint(location, {});
await client.waitForRequestsToSettle();
threadClient.once("paused", function(packet) {
threadClient.once("paused", async function(packet) {
// Check the return value.
Assert.equal(packet.type, "paused");
Assert.equal(packet.why.type, "breakpoint");
// Check that the breakpoint worked.
Assert.equal(debuggee.i, 0);
// Remove the breakpoint.
threadClient.removeBreakpoint(location);
await client.waitForRequestsToSettle();
const location2 = {
sourceUrl: source.url,
@ -40,26 +41,27 @@ add_task(threadClientTest(({ threadClient, debuggee }) => {
column: 12,
};
threadClient.setBreakpoint(location2, {});
await client.waitForRequestsToSettle();
threadClient.once("paused", function(packet) {
threadClient.once("paused", async function(packet) {
// Check the return value.
Assert.equal(packet.type, "paused");
Assert.equal(packet.why.type, "breakpoint");
// Check that the breakpoint worked.
Assert.equal(debuggee.i, 1);
// Remove the breakpoint.
threadClient.removeBreakpoint(location2);
await client.waitForRequestsToSettle();
threadClient.resume().then(resolve);
});
// Continue until the breakpoint is hit again.
threadClient.resume();
await threadClient.resume();
});
// Continue until the breakpoint is hit.
threadClient.resume();
await threadClient.resume();
});
/* eslint-disable */

Просмотреть файл

@ -26,7 +26,6 @@ add_task(threadClientTest(({ threadClient, debuggee }) => {
threadClient.once("paused", function(packet) {
// Check the return value.
Assert.equal(packet.type, "paused");
Assert.equal(packet.why.type, "breakpoint");
// Check that the breakpoint worked.
Assert.equal(debuggee.a, undefined);
@ -44,7 +43,6 @@ add_task(threadClientTest(({ threadClient, debuggee }) => {
threadClient.once("paused", function(packet) {
// Check the return value.
Assert.equal(packet.type, "paused");
Assert.equal(packet.why.type, "breakpoint");
// Check that the breakpoint worked.
Assert.equal(debuggee.a.b, 1);

Просмотреть файл

@ -26,7 +26,6 @@ add_task(threadClientTest(({ threadClient, debuggee, client }) => {
threadClient.setBreakpoint(location, {});
threadClient.on("paused", function onPaused(packet) {
Assert.equal(packet.type, "paused");
Assert.equal(packet.why.type, "breakpoint");
Assert.equal(packet.frame.where.actor, source.actor);
Assert.equal(packet.frame.where.line, location.line);

Просмотреть файл

@ -52,7 +52,8 @@ function setBreakpoint(packet, threadClient, client) {
threadClient.once("resumed", resolve);
threadClient.setBreakpoint({ sourceUrl: source.url, line: 3 }, {});
threadClient.resume();
await client.waitForRequestsToSettle();
await threadClient.resume();
});
}

Просмотреть файл

@ -30,7 +30,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee }) => {
await resume(threadClient);
packet = await waitForPause(threadClient);
Assert.equal(packet.type, "paused");
Assert.equal(packet.why.type, "breakpoint");
Assert.equal(packet.frame.where.actor, source.actor);
Assert.equal(packet.frame.where.line, location.line);

Просмотреть файл

@ -11,8 +11,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee, targetFront }) => {
await new Promise(resolve => {
threadClient.on("paused", function(packet) {
Assert.equal(false, "error" in packet);
Assert.equal(packet.from, threadClient.actor);
Assert.equal(packet.type, "paused");
Assert.ok("actor" in packet);
Assert.ok("why" in packet);
Assert.equal(packet.why.type, "debuggerStatement");

Просмотреть файл

@ -31,7 +31,6 @@ function run_test() {
function test_banana_environment() {
gThreadClient.once("paused",
function(packet) {
equal(packet.type, "paused");
const env = packet.frame.environment;
equal(env.type, "function");
equal(env.function.name, "banana3");

Просмотреть файл

@ -5,7 +5,9 @@
"use strict";
add_task(threadClientTest(async ({ threadClient, debuggee, client, targetFront }) => {
const onPaused = waitForEvent(threadClient, "paused");
await threadClient.interrupt();
await onPaused;
Assert.equal(threadClient.paused, true);
await threadClient.resume();
Assert.equal(threadClient.paused, false);

Просмотреть файл

@ -48,9 +48,13 @@ function test_simple_breakpoint() {
sourceUrl: source.url,
line: 3,
}, { logValue: "a" });
await gClient.waitForRequestsToSettle();
// Execute the rest of the code.
gThreadClient.resume();
await gThreadClient.resume();
Assert.equal(lastMessage.level, "logPoint");
Assert.equal(lastMessage.arguments[0], "three");
finishClient(gClient);
});
/* eslint-disable */
@ -62,8 +66,4 @@ function test_simple_breakpoint() {
"test.js",
1);
/* eslint-enable */
Assert.equal(lastMessage.level, "logPoint");
Assert.equal(lastMessage.arguments[0], "three");
finishClient(gClient);
}

Просмотреть файл

@ -48,9 +48,12 @@ function test_simple_breakpoint() {
sourceUrl: source.url,
line: 4,
}, { logValue: "a", condition: "a === 5" });
await gClient.waitForRequestsToSettle();
// Execute the rest of the code.
gThreadClient.resume();
await gThreadClient.resume();
Assert.equal(lastMessage.arguments[0], 5);
finishClient(gClient);
});
/* eslint-disable */
@ -64,7 +67,4 @@ function test_simple_breakpoint() {
"test.js",
1);
/* eslint-enable */
Assert.equal(lastMessage.arguments[0], 5);
finishClient(gClient);
}

Просмотреть файл

@ -27,7 +27,6 @@ function run_test() {
function test_simple_new_source() {
gThreadClient.once("newSource", function(packet) {
Assert.equal(packet.type, "newSource");
Assert.ok(!!packet.source);
Assert.ok(!!packet.source.url.match(/test_new_source-01.js$/));

Просмотреть файл

@ -35,12 +35,10 @@ function test_simple_new_source() {
gThreadClient.once("paused", function() {
gThreadClient.once("newSource", async function(packet2) {
// The "stopMe" eval source is emitted first.
Assert.equal(packet2.type, "newSource");
Assert.ok(!!packet2.source);
Assert.ok(packet2.source.introductionType, "eval");
gThreadClient.once("newSource", function(packet) {
Assert.equal(packet.type, "newSource");
dump(JSON.stringify(packet, null, 2));
Assert.ok(!!packet.source);
Assert.ok(!!packet.source.url.match(/example\.com/));

Просмотреть файл

@ -16,7 +16,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee }) => {
Cu.evalInSandbox("f()", debuggee);
}, threadClient);
Assert.equal(packet.type, "paused");
const why = packet.why;
Assert.equal(why.type, "breakpoint");
Assert.equal(why.actors.length, 1);

Просмотреть файл

@ -16,7 +16,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee }) => {
Cu.evalInSandbox("f()", debuggee);
}, threadClient);
Assert.equal(packet.type, "paused");
const why = packet.why;
Assert.equal(why.type, "breakpoint");
Assert.equal(why.actors.length, 1);

Просмотреть файл

@ -17,7 +17,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee, targetFront }) => {
loadSubScriptWithOptions(SOURCE_URL, {target: debuggee, ignoreCache: true});
});
}, threadClient);
Assert.equal(packet.type, "paused");
const why = packet.why;
Assert.equal(why.type, "breakpoint");
Assert.equal(why.actors.length, 1);

Просмотреть файл

@ -13,7 +13,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee }) => {
const packet = await executeOnNextTickAndWaitForPause(function() {
Cu.evalInSandbox("f()", debuggee);
}, threadClient);
Assert.equal(packet.type, "paused");
const why = packet.why;
Assert.equal(why.type, "breakpoint");
Assert.equal(why.actors.length, 1);

Просмотреть файл

@ -17,7 +17,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee, targetFront }) => {
loadSubScriptWithOptions(SOURCE_URL, {target: debuggee, ignoreCache: true});
});
}, threadClient);
Assert.equal(packet.type, "paused");
const why = packet.why;
Assert.equal(why.type, "breakpoint");
Assert.equal(why.actors.length, 1);

Просмотреть файл

@ -14,7 +14,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee }) => {
let packet = await executeOnNextTickAndWaitForPause(function() {
Cu.evalInSandbox("f()", debuggee);
}, threadClient);
Assert.equal(packet.type, "paused");
let why = packet.why;
Assert.equal(why.type, "breakpoint");
Assert.equal(why.actors.length, 1);
@ -32,7 +31,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee }) => {
() => resume(threadClient),
threadClient
);
Assert.equal(packet.type, "paused");
why = packet.why;
Assert.equal(why.type, "breakpoint");
Assert.equal(why.actors.length, 1);

Просмотреть файл

@ -14,7 +14,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee }) => {
const packet = await executeOnNextTickAndWaitForPause(function() {
Cu.evalInSandbox("f()", debuggee);
}, threadClient);
Assert.equal(packet.type, "paused");
const why = packet.why;
Assert.equal(why.type, "breakpoint");
Assert.equal(why.actors.length, 1);

Просмотреть файл

@ -14,7 +14,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee }) => {
const packet = await executeOnNextTickAndWaitForPause(function() {
Cu.evalInSandbox("f()", debuggee);
}, threadClient);
Assert.equal(packet.type, "paused");
const why = packet.why;
Assert.equal(why.type, "breakpoint");
Assert.equal(why.actors.length, 1);

Просмотреть файл

@ -10,7 +10,6 @@
*/
async function testFinish({threadClient, debuggerClient}) {
await resume(threadClient);
await close(debuggerClient);
do_test_finished();
@ -57,7 +56,7 @@ async function stepOutOfA(dbg, func, expectedLocation) {
deepEqual(getPauseLocation(packet), expectedLocation, `step out location in ${func}`);
await resume(threadClient);
await threadClient.resume();
}
async function stepOverInA(dbg, func, expectedLocation) {
@ -71,8 +70,7 @@ async function stepOverInA(dbg, func, expectedLocation) {
packet = await stepOver(threadClient);
deepEqual(getPauseLocation(packet), expectedLocation, `step out location in ${func}`);
await resume(dbg.threadClient);
await dbg.threadClient.resume();
}
async function testStep(dbg, func, expectedLocation) {

Просмотреть файл

@ -17,21 +17,18 @@ add_task(threadClientTest(async ({ threadClient, debuggee }) => {
equal(debuggee.b, undefined);
const step1 = await stepIn(threadClient);
equal(step1.type, "paused");
equal(step1.why.type, "resumeLimit");
equal(step1.frame.where.line, 3);
equal(debuggee.a, undefined);
equal(debuggee.b, undefined);
const step3 = await stepIn(threadClient);
equal(step3.type, "paused");
equal(step3.why.type, "resumeLimit");
equal(step3.frame.where.line, 4);
equal(debuggee.a, 1);
equal(debuggee.b, undefined);
const step4 = await stepIn(threadClient);
equal(step4.type, "paused");
equal(step4.why.type, "resumeLimit");
equal(step4.frame.where.line, 4);
equal(debuggee.a, 1);

Просмотреть файл

@ -13,7 +13,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee }) => {
await executeOnNextTickAndWaitForPause(() => evaluateTestCode(debuggee), threadClient);
const step1 = await stepOut(threadClient);
equal(step1.type, "paused");
equal(step1.frame.where.line, 8);
equal(step1.why.type, "resumeLimit");

Просмотреть файл

@ -14,7 +14,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee }) => {
dumpn("Step Over to f()");
const step1 = await stepOver(threadClient);
equal(step1.type, "paused");
equal(step1.why.type, "resumeLimit");
equal(step1.frame.where.line, 6);
equal(debuggee.a, undefined);
@ -22,7 +21,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee }) => {
dumpn("Step Over f()");
const step2 = await stepOver(threadClient);
equal(step2.type, "paused");
equal(step2.frame.where.line, 7);
equal(step2.why.type, "resumeLimit");
equal(debuggee.a, 1);

Просмотреть файл

@ -21,21 +21,18 @@ add_task(threadClientTest(async ({ threadClient, debuggee }) => {
await executeOnNextTickAndWaitForPause(() => evaluateTestCode(debuggee), threadClient);
const step1 = await stepIn(threadClient);
equal(step1.type, "paused");
equal(step1.frame.where.line, 3);
equal(step1.why.type, "resumeLimit");
equal(debuggee.a, undefined);
equal(debuggee.b, undefined);
const step2 = await stepIn(threadClient);
equal(step2.type, "paused");
equal(step2.frame.where.line, 4);
equal(step2.why.type, "resumeLimit");
equal(debuggee.a, 1);
equal(debuggee.b, undefined);
const step3 = await stepIn(threadClient);
equal(step3.type, "paused");
equal(step3.frame.where.line, 4);
equal(step3.why.type, "resumeLimit");
equal(debuggee.a, 1);
@ -44,7 +41,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee }) => {
await new Promise(async resolve => {
await threadClient.stepIn();
threadClient.once("paused", (packet) => {
equal(packet.type, "paused");
// Before fixing bug 785689, the type was resumeLimit.
equal(packet.why.type, "debuggerStatement");
resolve();

Просмотреть файл

@ -32,7 +32,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee }) => {
dumpn("Step Over to line 3");
const step1 = await stepOver(threadClient);
equal(step1.type, "paused");
equal(step1.why.type, "resumeLimit");
equal(step1.frame.where.line, 3);
equal(step1.frame.where.column, 12);
@ -42,7 +41,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee }) => {
dumpn("Step Over to line 4");
const step2 = await stepOver(threadClient);
equal(step2.type, "paused");
equal(step2.why.type, "resumeLimit");
equal(step2.frame.where.line, 4);
equal(step2.frame.where.column, 12);
@ -52,7 +50,6 @@ add_task(threadClientTest(async ({ threadClient, debuggee }) => {
dumpn("Step Over to the end of line 4");
const step3 = await stepOver(threadClient);
equal(step3.type, "paused");
equal(step3.why.type, "resumeLimit");
equal(step3.frame.where.line, 4);
equal(step3.frame.where.column, 14);