docshell/test/navigation/file_shiftReload_and_pushState.html
author Byron Campen [:bwc] <docfaraday@gmail.com>
Mon, 29 Apr 2019 15:51:30 +0000
changeset 471964 f8a6a019f873aaebc47740ea1423c0985aaedf69
parent 444991 27b21e84ba9c64b4ea42711cc77f94f5f253e9be
permissions -rw-r--r--
Bug 1531803 - Part 3: Only set track id on JsepTrack if we're configured to emit track ids in SDP, and simplify some code. r=mjf Differential Revision: https://phabricator.services.mozilla.com/D25796

<html>
  <head>
    <script>
      function test() {
        try {
          frames[0].history.pushState({}, "state", "?pushed");
        } catch (ex) {
          opener.ok(false, "history.pushState shouldn't throw");
        }

        if (!opener.shiftReloadPushStateFirstRound) {
          opener.shiftReloadPushStateFirstRound = true;
          window.location.reload(true);
        } else {
          opener.ok(true, "Did run history.push");
          opener.nextTest();
          window.close();
        }
      }

      window.addEventListener("load", function() { setTimeout(test, 0); });
    </script>
  </head>
  <body>
  <iframe src="frame0.html"></iframe>
  <script>
  </script>
  </body>
</html>