tor-browser

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

exception-order-not-fully-active-unserializablestate.html (744B)


      1 <!doctype html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <iframe id="iframe" src="/common/blank.html"></iframe>
      5 
      6 <script>
      7 async_test(t => {
      8  window.onload = t.step_func_done(() => {
      9    const wNavigation = iframe.contentWindow.navigation;
     10    const wDOMException = iframe.contentWindow.DOMException;
     11 
     12    iframe.remove();
     13 
     14    assert_throws_dom("InvalidStateError", wDOMException, () => {
     15      wNavigation.updateCurrentEntry({ state: document.body });
     16    });
     17    assert_equals(navigation.currentEntry.getState(), undefined);
     18  });
     19 }, `updateCurrentEntry() with unserializable state while not fully active must throw an "InvalidStateError", not a "DataCloneError"`);
     20 </script>