blob: 6a791502c3dcd8c85e96ef0eea9a4691a989e39c [file] [log] [blame]
<html>
<head>
<script src="resources/sw-test-pre.js"></script>
</head>
<body>
<script>
navigator.serviceWorker.addEventListener("message", function(event) {
if (event.data)
log("PASS: service worker received activate event and resolved the extend lifetime promise");
else
log("FAIL: service worker did not receive activate event or did not resolve the extend lifetime promise");
finishSWTest();
});
navigator.serviceWorker.register("resources/basic-activate-event-worker.js", { }).then(function(registration) {
waitForState(registration.installing, "activated").then(function() {
registration.active.postMessage("CheckResolvedExtendLifetimePromise");
});
}, function() {
log("FAIL: Failed to register the service worker");
finishSWTest();
});
</script>
</body>
</html>