tor-browser

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

cross-document-nav-cross-document-nav.html (1010B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>Cross-document navigation after a cross-document navigation</title>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 
      7 <!--
      8  According to the spec, the navigate algorithm synchronously cancels ongoing
      9  non-mature navigations.
     10 -->
     11 
     12 <body>
     13 <script type="module">
     14 import { createIframe, waitForLoad, waitForPotentialNetworkLoads } from "./resources/helpers.mjs";
     15 
     16 promise_test(async t => {
     17  const iframe = await createIframe(t);
     18 
     19  iframe.contentWindow.location.search = "?1";
     20  iframe.contentWindow.location.search = "?2";
     21  assert_equals(iframe.contentWindow.location.search, "");
     22 
     23  await waitForLoad(iframe);
     24  assert_equals(iframe.contentWindow.location.search, "?2");
     25 
     26  iframe.onload = t.unreached_func("second load event");
     27  await waitForPotentialNetworkLoads(t);
     28  assert_equals(iframe.contentWindow.location.search, "?2");
     29 }, "cross-document navigation then cross-document navigation");
     30 </script>