11cb0ef41Sopenharmony_ci// META: global=window,dedicatedworker,sharedworker 21cb0ef41Sopenharmony_ci// 31cb0ef41Sopenharmony_ci// Do not run this in a service worker as that's always in a secure context 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_citest(() => { 61cb0ef41Sopenharmony_ci assert_equals(self.crypto.subtle, undefined); 71cb0ef41Sopenharmony_ci assert_false("subtle" in self.crypto); 81cb0ef41Sopenharmony_ci}, "Non-secure context window does not have access to crypto.subtle"); 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_citest(() => { 111cb0ef41Sopenharmony_ci assert_equals(self.SubtleCrypto, undefined); 121cb0ef41Sopenharmony_ci assert_false("SubtleCrypto" in self); 131cb0ef41Sopenharmony_ci}, "Non-secure context window does not have access to SubtleCrypto") 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_citest(() => { 161cb0ef41Sopenharmony_ci assert_equals(self.CryptoKey, undefined); 171cb0ef41Sopenharmony_ci assert_false("CryptoKey" in self); 181cb0ef41Sopenharmony_ci}, "Non-secure context window does not have access to CryptoKey") 19