summaryrefslogtreecommitdiffstats
path: root/docshell/test/navigation/file_shiftReload_and_pushState.html
blob: 7882143c83a7a7e4921a23490b5263f453c95139 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<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.finishTest();
        }
      }

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