blob: 9673a7c36158f97e4a42977554a85e5913407aea [file] [log] [blame]
<!DOCTYPE html>
<title>Register a ServiceWorker On An Insecure Origin</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/get-host-info.js"></script>
<script>
if (window.location.origin != get_host_info().UNAUTHENTICATED_ORIGIN) {
window.location = get_host_info().UNAUTHENTICATED_ORIGIN + window.location.pathname;
} else {
test(t => {
assert_false('serviceWorker' in navigator, 'navigator.serviceWorker should not be present');
}, 'navigator.serviceWorker requires a secure context');
}
</script>