summaryrefslogtreecommitdiffstats
path: root/docshell/test/navigation/test_bug145971.html
blob: ffad27a9c3bcd466cefae8de9e4ca615aa56e0af (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>
      let pass = false;
      let initialLoad = false;
      var bc = new BroadcastChannel("bug145971");
      function checkNavigationTypeEquals2() {
        if (performance.navigation.type == 2) {
          pass = true;
        }
        testDone();
      }

      function testDone() {
        bc.postMessage({result: pass});
        bc.close();
        window.close();
      }

      function test() {
        window.onpageshow = checkNavigationTypeEquals2;
        window.location.href = 'goback.html';
      }
    </script>
  </head>
  <body onload="setTimeout(test, 0);">
  Testing bug 145971.
  </body>
</html>