blob: 2124ec750e6607c93ded992e90f120a4dd2c2351 [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-message" });
const worker = registration.installing;
await waitForState(registration.installing, "activated");
return waitForServiceWorkerNoLongerRunning(worker);
}, "Spin in message");
promise_test(async (test) => {
const registration = await navigator.serviceWorker.register("service-worker-spinning-worker.js", { scope : "spin-after-message" });
const worker = registration.installing;
await waitForState(registration.installing, "activated");
return waitForServiceWorkerNoLongerRunning(worker);
}, "Spin after message");
</script>
</body>
</html>