register_https.html (446B)
1 <!DOCTYPE html> 2 <script> 3 function ok(condition, message) { 4 parent.postMessage({type: "ok", status: condition, msg: message}, "*"); 5 } 6 7 function done() { 8 parent.postMessage({type: "done"}, "*"); 9 } 10 11 ok(location.protocol == "https:", "We should be loaded from HTTPS"); 12 ok(!window.isSecureContext, "Should not be secure context"); 13 ok(!("serviceWorker" in navigator), "ServiceWorkerContainer not availalble in insecure context"); 14 done(); 15 </script>