docshell/test/navigation/file_shiftReload_and_pushState.html
author Toby Ward <tobyfrederickward@gmail.com>
Wed, 07 Nov 2018 13:55:47 +0000
changeset 444991 27b21e84ba9c64b4ea42711cc77f94f5f253e9be
parent 444741 1942bfe9ee2dfd98714ba94ec7e5aeaff74d9909
permissions -rw-r--r--
Bug 1496082: Enable ESLint for docshell/test/navigation and docshell/test/unit (automatic fixes only). r=bzbarsky Enabled ESLint for: * docshell/test/navigation/** * docshell/test/unit/** * docshell/test/unit_ipc/** Changed .eslintignore to allow for this and ran ./mach eslint --fix on the above directories and checked automatic fixes Differential Revision: https://phabricator.services.mozilla.com/D9430

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