blob: 32a3f11da67566212821e20c7e5ebe44cc82551a [file] [log] [blame]
<!doctype html><!-- webkit-test-runner [ useServiceWorkerShortTimeout=true ] -->
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/routines.js"></script>
</head>
<body>
<script>
promise_test(async (test) => {
const registration = await navigator.serviceWorker.register("service-worker-spinning-worker.js", { scope : "spin-activate" });
const worker = registration.installing;
await waitForState(registration.installing, "activating");
return waitForServiceWorkerNoLongerRunning(worker);
}, "Spin in activate");
promise_test(async (test) => {
const registration = await navigator.serviceWorker.register("service-worker-spinning-worker.js", { scope : "spin-after-activate" });
const worker = registration.installing;
await waitForState(worker, "activated");
return waitForServiceWorkerNoLongerRunning(worker);
}, "Spin after activate");
</script>
</body>
</html>