tor-browser

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

entries-after-blank-navigation-from-cross-origin.html (875B)


      1 <!doctype html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <script src="/common/get-host-info.sub.js"></script>
      5 <body>
      6 <script>
      7 promise_test(async t => {
      8  await new Promise(resolve => window.onload = () => t.step_timeout(resolve, 0));
      9 
     10  let i = document.createElement("iframe");
     11  i.src = get_host_info().HTTP_ORIGIN_WITH_DIFFERENT_PORT + "/common/blank.html";
     12  document.body.appendChild(i);
     13  await new Promise(resolve => i.onload = () => t.step_timeout(resolve, 0));
     14 
     15  i.contentWindow.location = "about:blank";
     16  await new Promise(resolve => i.onload = resolve);
     17  let entries = i.contentWindow.navigation.entries();
     18  assert_equals(entries.length, 1);
     19  assert_equals(entries[0].url, "about:blank");
     20 }, "entries() should not be leaked from cross-origin when navigating to about:blank");
     21 </script>
     22 </body>