Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Re-enable wasm test (#4644)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonLaster authored Nov 9, 2017
1 parent 60c5981 commit 9829e4c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/test/mochitest/browser.ini
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,5 @@ skip-if = os == "win" # Bug 1393121
[browser_dbg-tabs.js]
[browser_dbg-toggling-tools.js]
[browser_dbg-wasm-sourcemaps.js]
skip-if = asan
[browser_dbg-reload.js]
1 change: 1 addition & 0 deletions src/test/mochitest/browser_dbg-wasm-sourcemaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ add_task(async function() {
// "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);
await waitForPaused(dbg);

Expand Down
10 changes: 10 additions & 0 deletions src/test/mochitest/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,16 @@ function waitForLoadedSource(dbg, url) {
);
}

function waitForLoadedSources(dbg) {
return waitForState(
dbg,
state => {
const sources = dbg.selectors.getSources(state).valueSeq().toJS()
return !sources.some(source => source.loadedState == "loading")
},
"loaded source"
);
}
/**
* Selects the source.
*
Expand Down

0 comments on commit 9829e4c

Please sign in to comment.