tor-browser

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

iframe-added-post-activation.https.html (1046B)


      1 <!DOCTYPE html>
      2 <!--
      3 Tests that an iframe added after activation starts out with
      4 document.prerendering false.
      5 -->
      6 <title>iframe added after activation</title>
      7 <meta name="timeout" content="long">
      8 <script src="/resources/testharness.js"></script>
      9 <script src="/resources/testharnessreport.js"></script>
     10 <script src="/common/utils.js"></script>
     11 <script src="../resources/utils.js"></script>
     12 <script src="resources/utils.js"></script>
     13 
     14 <body>
     15 <script>
     16 setup(() => assertSpeculationRulesIsSupported());
     17 
     18 promise_test(async t => {
     19  const uid = token();
     20  const channel = new PrerenderChannel('test-channel', uid);
     21  const messageQueue = new BroadcastMessageQueue(channel);
     22  t.add_cleanup(_ => channel.close());
     23 
     24  // Make the window to start the prerender.
     25  const url = `resources/iframe-added-post-activation.html?uid=${uid}`;
     26  window.open(url, '_blank', 'noopener');
     27 
     28  // Wait for done.
     29  const msg = await messageQueue.nextMessage();
     30  assert_equals(msg, 'PASS');
     31 }, 'iframe added after activation has false document.prerendering');
     32 </script>