Skip to content

Commit 61f075a

Browse files
committed
Run test for absence of SubtleCrypto in ShadowRealm scopes
ShadowRealm scopes, even when created in a secure context, should not be able to access crypto.subtle, SubtleCrypto, or CryptoKey, because those are not [Exposed=*].
1 parent a67ed68 commit 61f075a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

WebCryptoAPI/historical.any.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
// META: global=window,dedicatedworker,sharedworker
1+
// META: global=window,dedicatedworker,sharedworker,shadowrealm
22
//
3-
// Do not run this in a service worker as that's always in a secure context
3+
// Do not run this in a service worker as that's always in a secure context.
4+
// ShadowRealm scopes created from secure contexts are OK, because SubtleCrypto
5+
// is not [Exposed=*].
46

57
test(() => {
68
assert_equals(self.crypto.subtle, undefined);

0 commit comments

Comments
 (0)