Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: os == 'android'
- Manifest: js/xpconnect/tests/unit/xpcshell.toml
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
add_task(async function testSharedInWorker() {
// Loading into shared global isn't allowed in worker.
let { promise, resolve } = Promise.withResolvers();
worker.onmessage = event => {
resolve(event.data);
};
worker.postMessage("");
const result = await promise;
Assert.equal(result.caught1, true);
Assert.equal(result.caught2, true);
Assert.equal(result.caught3, true);
});