tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

broadcast-channel.html (896B)


      1 <!DOCTYPE HTML>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <script src="/common/utils.js"></script>
      5 <script src="/common/dispatcher/dispatcher.js"></script>
      6 <script src="../resources/helper.sub.js"></script>
      7 <script>
      8 // Check whether the page is BFCached when there are open BroadcastChannels.
      9 // See https://github.com/whatwg/html/issues/7219 for other related scenarios.
     10 runEventTest(
     11  {funcBeforeNavigation: () => {
     12      window.bc = new BroadcastChannel('foo');
     13  }},
     14  'Eligibility (BroadcastChannel)');
     15 
     16 // Same as above, but the BroadcastChannels are closed in the pagehide event.
     17 runEventTest(
     18  {funcBeforeNavigation: () => {
     19      window.bc = new BroadcastChannel('foo');
     20      window.addEventListener('pagehide', () => window.bc.close());
     21  }},
     22  'Eligibility (BroadcastChannel closed in the pagehide event)');
     23 </script>