зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1611424 - Intermittent TV dom/broadcastchannel/tests/test_wasm.html, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D60977 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
4f9eced3a7
Коммит
c4f533906f
|
@ -14,7 +14,7 @@ bc.onmessage = e => {
|
|||
bc.postMessage(e.data);
|
||||
bc.close();
|
||||
}
|
||||
self.postMessage("ready");
|
||||
bc.postMessage("ready");
|
||||
</script>
|
||||
|
||||
<script type="application/javascript">
|
||||
|
@ -76,20 +76,20 @@ function test_worker() {
|
|||
return;
|
||||
}
|
||||
|
||||
const blob = new Blob([document.getElementById('myWorker').textContent]);
|
||||
const w = new Worker(URL.createObjectURL(blob));
|
||||
w.onmessage = e => {
|
||||
is(e.data, "ready", "The worker is ready");
|
||||
const bc = new BroadcastChannel('b');
|
||||
const bc = new BroadcastChannel('b');
|
||||
bc.onmessage = e => {
|
||||
if (e.data === "ready") {
|
||||
bc.postMessage({ wasmModule });
|
||||
return;
|
||||
}
|
||||
|
||||
bc.onmessage = ee => {
|
||||
ok(ee.data.wasmModule instanceof WebAssembly.Module, "WasmModule received");
|
||||
bc.close();
|
||||
next();
|
||||
};
|
||||
|
||||
bc.postMessage({ wasmModule });
|
||||
ok(e.data.wasmModule instanceof WebAssembly.Module, "WasmModule received");
|
||||
bc.close();
|
||||
next();
|
||||
};
|
||||
|
||||
const blob = new Blob([document.getElementById('myWorker').textContent]);
|
||||
new Worker(URL.createObjectURL(blob));
|
||||
}
|
||||
|
||||
const tests = [
|
||||
|
|
Загрузка…
Ссылка в новой задаче