Bug 1560631 - Enable browser_dbg-wasm-sourcemaps.js test r=jlast

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Yury Delendik 2019-06-24 18:44:22 +00:00
parent 3a78f0f3e1
commit bfb70f4334
2 changed files with 13 additions and 15 deletions

View File

@ -802,7 +802,6 @@ skip-if = os == "win"
[browser_dbg-react-app.js]
skip-if = os == "win"
[browser_dbg-wasm-sourcemaps.js]
skip-if = true
[browser_dbg-windowless-workers.js]
[browser_dbg-windowless-workers-early-breakpoint.js]
[browser_dbg-worker-scopes.js]

View File

@ -7,26 +7,25 @@
*/
add_task(async function() {
const dbg = await initDebugger("doc-wasm-sourcemaps.html");
// NOTE: wait for page load -- attempt to fight the intermittent failure:
// "A promise chain failed to handle a rejection: Debugger.Frame is not live"
await waitForSource(dbg, "doc-wasm-sourcemaps");
await waitForLoadedSources(dbg);
await reload(dbg);
// After reload() we are getting getSources notifiction for old sources,
// using the debugger statement to really stop are reloaded page.
await waitForPaused(dbg);
await resume(dbg);
await waitForLoadedSource(dbg, "doc-wasm-sourcemaps");
assertPausedLocation(dbg);
await waitForSource(dbg, "fib.c");
await waitForSources(dbg, "doc-wasm-sourcemaps.html", "fib.c");
// Set breakpoint and reload the page.
ok(true, "Original sources exist");
const mainSrc = findSource(dbg, "fib.c");
await selectSource(dbg, mainSrc);
await selectSource(dbg, "fib.c");
await addBreakpoint(dbg, "fib.c", 10);
reload(dbg);
// The same debugger statement as above, but using at for
// workaround to break at original source (see below) and not generated.
await waitForPaused(dbg);
await selectSource(dbg, "fib.c");
resume(dbg);
await waitForPaused(dbg, "fib.c");
@ -38,6 +37,6 @@ add_task(async function() {
is(
firstFrameLocation.includes("fib.c"),
true,
"It shall be to fib.c source"
"It shall be fib.c source"
);
});