blob: 7db21941f11b4abc59dbde75778e41fa18535401 [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 SharedWorker('resources/serviceworker-in-sharedworker.js');
await new Promise(resolve => worker.port.onmessage = resolve);
const registrations = await navigator.serviceWorker.getRegistrations();
assert_equals(registrations.length, 1);
}, "Register service worker in worker");
</script>
</body>
</html>