tor-browser

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

navigate-from-initial-about-blank.html (826B)


      1 <!doctype html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <iframe id="i"></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 
     13 <script>
     14 async_test(t => {
     15  i.contentWindow.navigation.navigate("/common/blank.html?1");
     16  i.onload = t.step_func_done(() => {
     17    const iframeURL = new URL(i.contentWindow.navigation.currentEntry.url);
     18    assert_equals(iframeURL.pathname, "/common/blank.html");
     19    assert_equals(iframeURL.search, "?1");
     20  });
     21 }, `navigate() from <iframe> still on initial about:blank works`);
     22 </script>