summaryrefslogtreecommitdiffstats
path: root/dom/serviceworkers/test/fetch/upgrade-insecure/register.html
blob: 6309b9b218fe7a0071b29fa2c312634656763271 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!DOCTYPE html>
<script>
  function ok(v, msg) {
    window.parent.postMessage({status: "ok", result: !!v, message: msg}, "*");
  }

  function done(reg) {
    ok(reg.active, "The active worker should be available.");
    window.parent.postMessage({status: "registrationdone"}, "*");
  }

  navigator.serviceWorker.ready.then(done);
  navigator.serviceWorker.register("upgrade-insecure_test.js", {scope: "."});
</script>