isSecureContext.https.html (914B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Service Worker: isSecureContext</title> 5 </head> 6 <body> 7 <script src="/resources/testharness.js"></script> 8 <script src="/resources/testharnessreport.js"></script> 9 <script src="../resources/test-helpers.sub.js"></script> 10 <script> 11 'use strict'; 12 13 promise_test(async (t) => { 14 var url = 'isSecureContext.serviceworker.js'; 15 var scope = 'empty.html'; 16 var frame_sw, sw_registration; 17 18 await service_worker_unregister(t, scope); 19 var f = await with_iframe(scope); 20 t.add_cleanup(function() { 21 f.remove(); 22 }); 23 frame_sw = f.contentWindow.navigator.serviceWorker; 24 var registration = await navigator.serviceWorker.register(url, {scope: scope}); 25 sw_registration = registration; 26 await wait_for_state(t, registration.installing, 'activated'); 27 fetch_tests_from_worker(sw_registration.active); 28 }, 'Setting up tests'); 29 30 </script> 31 </body> 32 </html>