summaryrefslogtreecommitdiffstats
path: root/docshell/test/mochitest/file_bfcache_plus_hash_1.html
blob: 199f6003e0d688b427652c049bf02c42198fd522 (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
<html><body>
  Popup 1
  <script type="application/javascript">
    var bc = new BroadcastChannel("bug646641_1");
    window.onload = () => {
      bc.postMessage({ message: "childLoad", num: 1 })
    }

    window.onpageshow = () => {
      bc.postMessage({ message: "childPageshow", num: 1 })
    }
    bc.onmessage = (msgEvent) => {
      var msg = msgEvent.data;
      if (msg == "pushState") {
        history.pushState("", "", "");
        location = "file_bfcache_plus_hash_2.html";
      } else if (msg == "close") {
        bc.postMessage({ message: "closed" });
        bc.close();
        window.close();
      }
    }
  </script>
</body></html>