blob: 5cc103598d3d193834dc42e169965448bace84ac [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 == 10)
log("PASS: service worker resolved all extend lifetime promises");
else
log("FAIL: service worker resolved only " + event.data + " promises");
finishSWTest();
});
navigator.serviceWorker.register("resources/basic-install-event-waitUntil-multiple-promises-worker.js", { }).then(function(registration) {
waitForState(registration.installing, "installed").then(function() {
registration.waiting.postMessage("CheckResolvedExtendLifetimePromises");
});
}, function() {
log("FAIL: Failed to register the service worker");
finishSWTest();
});
</script>
</body>
</html>