From 9829e4c32076d61bfff19c6a538df17d83e8cb9d Mon Sep 17 00:00:00 2001 From: Jason Laster Date: Thu, 9 Nov 2017 11:28:54 -0500 Subject: [PATCH] Re-enable wasm test (#4644) --- src/test/mochitest/browser.ini | 1 + src/test/mochitest/browser_dbg-wasm-sourcemaps.js | 1 + src/test/mochitest/head.js | 10 ++++++++++ 3 files changed, 12 insertions(+) diff --git a/src/test/mochitest/browser.ini b/src/test/mochitest/browser.ini index c453016cf2..e696df2126 100644 --- a/src/test/mochitest/browser.ini +++ b/src/test/mochitest/browser.ini @@ -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] diff --git a/src/test/mochitest/browser_dbg-wasm-sourcemaps.js b/src/test/mochitest/browser_dbg-wasm-sourcemaps.js index 17b29448d4..aa6da211c3 100644 --- a/src/test/mochitest/browser_dbg-wasm-sourcemaps.js +++ b/src/test/mochitest/browser_dbg-wasm-sourcemaps.js @@ -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); diff --git a/src/test/mochitest/head.js b/src/test/mochitest/head.js index ef23594210..6fa34401e9 100644 --- a/src/test/mochitest/head.js +++ b/src/test/mochitest/head.js @@ -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. *