1
0
Fork 0
firefox/testing/web-platform/tests/shared-storage/create-worklet-in-detached-frame.tentative.https.sub.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

22 lines
638 B
HTML

<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<iframe></iframe>
<script>
promise_test(async t => {
const iframe = document.querySelector('iframe');
const childSharedStorage = iframe.contentWindow.sharedStorage;
iframe.remove();
try {
await childSharedStorage.createWorklet("resources/simple-module.js");
} catch (e) {
assert_equals(e.name, 'InvalidAccessError');
return;
}
assert_unreached("did not reject");
}, 'createWorklet() when frame is detached');
</script>
</body>