tor-browser

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

navigate-from-initial-about-blank-src.html (866B)


      1 <!doctype html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <iframe id="i" src="/common/blank.html"></iframe>
      5 
      6 <!--
      7  Sort of a regression test for https://bugs.chromium.org/p/chromium/issues/detail?id=1289864,
      8  but since that is GC-dependent this will probably not fail in codebases that exhibit that bug.
      9  So it's really just adding some extra general coverage for navigation.navigate().
     10 -->
     11 
     12 <script>
     13 async_test(t => {
     14  i.contentWindow.navigation.navigate("/common/blank.html?1");
     15  i.onload = t.step_func_done(() => {
     16    const iframeURL = new URL(i.contentWindow.navigation.currentEntry.url);
     17    assert_equals(iframeURL.pathname, "/common/blank.html");
     18    assert_equals(iframeURL.search, "?1");
     19  });
     20 }, `navigate() from <iframe> with src="" but still on initial about:blank works`);
     21 </script>