crypto-subtle-secure-context-available.https.sub.html (717B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 </head> 7 <body> 8 <script> 9 async_test(function(t) { 10 assert_not_equals(typeof crypto.subtle, 'undefined'); 11 t.done(); 12 }, "Secure context window has access to crypto.subtle"); 13 async_test(function(t) { 14 var w = new Worker('../util/worker-report-crypto-subtle-presence.js'); 15 16 w.onmessage = t.step_func(function (e) { 17 if (e.data.msg_type == 'subtle_crypto_found') { 18 assert_equals(e.data.msg_value, true); 19 t.done(); 20 } 21 }); 22 23 }, "Secure context worker has access to crypto.subtle"); 24 </script> 25 </body> 26 </html>