blob: a76746bf6f9362c5d3b715011cf59b5e3e17c6e2 [file] [log] [blame]
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/service-workers/service-worker/resources/test-helpers.sub.js"></script>
</head>
<body>
<script>
var worker;
promise_test(async (test) => {
worker = new Worker('resources/serviceworker-in-worker.js');
await new Promise(resolve => worker.onmessage = resolve);
const registrations = await navigator.serviceWorker.getRegistrations();
assert_equals(registrations.length, 1);
}, "Register service worker in worker");
</script>
</body>
</html>