docshell/test/navigation/file_shiftReload_and_pushState.html
author Jeff Walden <jwalden@mit.edu>
Tue, 19 Nov 2019 04:55:39 +0000
changeset 502538 b5c5ba07d3dbd0d07b66fa42a103f4df2c27d3a2
parent 444991 27b21e84ba9c64b4ea42711cc77f94f5f253e9be
permissions -rw-r--r--
Bug 1596544 - intl_ValidateAndCanonicalizeUnicodeExtensionType should ignore the second |option| argument until it's needed to report an error. r=anba Differential Revision: https://phabricator.services.mozilla.com/D53145

<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>