tor-browser

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

opaque-origin-data-url.html (666B)


      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    window.onmessage = t.step_func_done(e => {
      9      assert_equals(e.data.length, 0);
     10      assert_true(e.data.currentIsNull);
     11    });
     12    i.src = "data:text/html,<script>top.postMessage({ length: navigation.entries().length, " +
     13        "currentIsNull: navigation.currentEntry === null}, '*')</sc" +
     14        "ript>";
     15  });
     16 }, "entries() and currentEntry after navigation to a data: URL (which has an opaque origin)");
     17 </script>