Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /permissions/crashtests/permissions-query-worker.window.html - WPT Dashboard Interop Dashboard
promise_test(async () => {
const worker = new Worker(URL.createObjectURL(new Blob([`
postMessage("load");
while (true) {
navigator.permissions.query({ name: "geolocation" });
}
`])));
await new Promise(resolve => {
worker.onmessage = (e) => {
if (e.data === "load") {
worker.terminate();
resolve();
}
};
});
}, "Terminating worker after permission query should not crash");