зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1529867 - Wait for worker source, r=jlast.
Differential Revision: https://phabricator.services.mozilla.com/D25612 --HG-- extra : rebase_source : 940a415ade4c80a9fa884375749e2f4c9cc2cbf0
This commit is contained in:
Родитель
6b19864a52
Коммит
33ca510058
|
@ -43,6 +43,8 @@ add_task(async function() {
|
|||
const worker2Thread = workers[1].actor;
|
||||
|
||||
const mainThreadSource = findSource(dbg, "doc-windowless-workers.html");
|
||||
|
||||
await waitForSource(dbg, "simple-worker.js");
|
||||
const workerSource = findSource(dbg, "simple-worker.js");
|
||||
|
||||
info("Test pausing in the main thread");
|
||||
|
|
|
@ -192,10 +192,7 @@ async function waitForSources(dbg, ...sources) {
|
|||
function waitForSource(dbg, url) {
|
||||
return waitForState(
|
||||
dbg,
|
||||
state => {
|
||||
const sources = dbg.selectors.getSources(state);
|
||||
return Object.values(sources).find(s => (s.url || "").includes(url));
|
||||
},
|
||||
state => findSource(dbg, url, { silent: true }),
|
||||
"source exists"
|
||||
);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче