tor-browser

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

cross-document-getState-undefined.html (718B)


      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 <script>
      6 async_test(t => {
      7  window.onload = t.step_func(() => {
      8    assert_equals(i.contentWindow.navigation.entries().length, 1);
      9    i.contentWindow.location.href = "?1";
     10    i.onload = t.step_func_done(() => {
     11      assert_equals(i.contentWindow.navigation.entries().length, 2);
     12      assert_equals(i.contentWindow.navigation.currentEntry.index, 1);
     13      assert_equals(i.contentWindow.navigation.entries()[0].getState(), undefined);
     14    });
     15  });
     16 }, "Default behavior for entry.getState() for a non-current cross-document entry");
     17 </script>