blob: 36b1d47623c62fe718fcafeed2516ada7389c32c [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="resources/sw-test-pre.js"></script>
</head>
<body>
<script>
let updatefoundCount = 0;
navigator.serviceWorker.register("resources/updating-worker.php", { }).then(function(registration) {
registration.addEventListener("updatefound", function() {
gc();
log("updatefound event fired");
updatefoundCount++;
if (updatefoundCount == 2)
finishSWTest();
});
registration.update();
setTimeout(function() {
gc();
}, 0);
});
</script>
</body>
</html>