summaryrefslogtreecommitdiffstats
path: root/docshell/test/navigation/file_shiftReload_and_pushState.html
blob: 5a777894b672f2fdc2fd92cb099ec9673b9b21ea (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
29
<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>