historical.any.js (636B)
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 5 test(() => { 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 10 test(() => { 11 assert_equals(self.SubtleCrypto, undefined); 12 assert_false("SubtleCrypto" in self); 13 }, "Non-secure context window does not have access to SubtleCrypto") 14 15 test(() => { 16 assert_equals(self.CryptoKey, undefined); 17 assert_false("CryptoKey" in self); 18 }, "Non-secure context window does not have access to CryptoKey")