• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// META: global=window,dedicatedworker,sharedworker
2//
3// Do not run this in a service worker as that's always in a secure context
4
5test(() => {
6  assert_equals(self.crypto.subtle, undefined);
7  assert_false("subtle" in self.crypto);
8}, "Non-secure context window does not have access to crypto.subtle");
9
10test(() => {
11  assert_equals(self.SubtleCrypto, undefined);
12  assert_false("SubtleCrypto" in self);
13}, "Non-secure context window does not have access to SubtleCrypto")
14
15test(() => {
16  assert_equals(self.CryptoKey, undefined);
17  assert_false("CryptoKey" in self);
18}, "Non-secure context window does not have access to CryptoKey")
19