tor-browser

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

entries-in-new-srcdoc-iframe.html (586B)


      1 <!doctype html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <iframe id="i" srcdoc="new"></iframe>
      5 
      6 <script>
      7 promise_test(async t => {
      8  await new Promise(resolve => window.onload = resolve);
      9 
     10  assert_not_equals(i.contentWindow.navigation.currentEntry, null);
     11  assert_array_equals(i.contentWindow.navigation.entries(), [i.contentWindow.navigation.currentEntry]);
     12 
     13  assert_equals(i.contentWindow.navigation.currentEntry.url, "about:srcdoc");
     14 }, "entries() and currentEntry should be set in a new srcdoc iframe");
     15 </script>