mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 07:01:19 +00:00
Bug 1494796 - fix verify test r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D34981 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
9d1bf84ed1
commit
9ab3272468
@ -28,6 +28,7 @@ add_task(async function() {
|
||||
invokeInTab("firstCall");
|
||||
await waitForPaused(dbg);
|
||||
|
||||
await waitForRequestsToSettle(dbg);
|
||||
await navigate(dbg, "doc-scripts.html", "simple1.js");
|
||||
await selectSource(dbg, "simple1");
|
||||
await addBreakpoint(dbg, "simple1.js", 4);
|
||||
@ -39,18 +40,29 @@ add_task(async function() {
|
||||
assertPausedLocation(dbg);
|
||||
is(countSources(dbg), 5, "5 sources are loaded.");
|
||||
|
||||
await waitForRequestsToSettle(dbg);
|
||||
// this test is intermittent without this
|
||||
let onBreakpoint = waitForDispatch(dbg, "SET_BREAKPOINT");
|
||||
await navigate(dbg, "doc-scripts.html", ...sources);
|
||||
await onBreakpoint
|
||||
is(countSources(dbg), 5, "5 sources are loaded.");
|
||||
ok(!getIsPaused(getCurrentThread()), "Is not paused");
|
||||
|
||||
await waitForRequestsToSettle(dbg);
|
||||
// this test is intermittent without this
|
||||
onBreakpoint = waitForDispatch(dbg, "SET_BREAKPOINT");
|
||||
await navigate(dbg, "doc-scripts.html", ...sources);
|
||||
await onBreakpoint
|
||||
is(countSources(dbg), 5, "5 sources are loaded.");
|
||||
|
||||
// Test that the current select source persists across reloads
|
||||
await selectSource(dbg, "long.js");
|
||||
await waitForRequestsToSettle(dbg);
|
||||
|
||||
await waitForRequestsToSettle(dbg);
|
||||
// this test is intermittent without this
|
||||
onBreakpoint = waitForDispatch(dbg, "SET_BREAKPOINT");
|
||||
await reload(dbg, "long.js");
|
||||
await onBreakpoint
|
||||
await waitForSelectedSource(dbg, "long.js");
|
||||
|
||||
await waitForRequestsToSettle(dbg);
|
||||
|
@ -195,8 +195,15 @@ class ThreadClient extends FrontClassWithSpec(threadSpec) {
|
||||
/**
|
||||
* Request the loaded sources for the current thread.
|
||||
*/
|
||||
getSources() {
|
||||
return super.sources();
|
||||
async getSources() {
|
||||
let sources = [];
|
||||
try {
|
||||
({sources} = await super.sources());
|
||||
} catch (e) {
|
||||
// we may have closed the connection
|
||||
console.log(`getSources failed. Connection may have closed: ${e}`);
|
||||
}
|
||||
return { sources };
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user