<!DOCTYPE html> | |
<html> | |
<body> | |
<script src="resources/sw-test-pre.js"></script> | |
<script> | |
log("* Tests that self.clients always returns the same object"); | |
log(""); | |
navigator.serviceWorker.addEventListener("message", function(event) { | |
log(event.data); | |
finishSWTest(); | |
}); | |
navigator.serviceWorker.register("resources/ServiceWorkerGlobalScope_clients_SameObject-worker.js", { }).then(function(registration) { | |
registration.installing.postMessage("runTest"); | |
}); | |
</script> | |
</body> | |
</html> |