blob: 2eca3f3d155d6feff49c8a1bcd470cbd62fdb0fa [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.py", { }).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>