blob: 316fc2c39aa1584ec7458d1a29de6a41fd1b00d7 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="resources/sw-test-pre.js"></script>
<script>
log("* Add basic testing for ServiceWorkerGlobalScope.registration");
log("");
navigator.serviceWorker.addEventListener("message", function(event) {
if (event.data === "DONE") {
finishSWTest();
return;
}
log(event.data);
});
navigator.serviceWorker.register("resources/self_registration-worker.js", { }).then(function(registration) {
worker = registration.installing;
waitForState(worker, "activated").then(function() {
worker.postMessage("DUMP_RESULTS");
});
});
</script>
</body>
</html>