tor-browser

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

reload-navigation-timing.html (586B)


      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 promise_test(async t => {
      7  await new Promise(resolve => window.onload = resolve);
      8  i.contentWindow.navigation.reload();
      9  await new Promise(resolve => i.onload = resolve);
     10 
     11  const entries = i.contentWindow.performance.getEntriesByType("navigation");
     12  assert_equals(entries.length, 1);
     13  assert_equals(entries[0].type, "reload");
     14 }, `reload() appears as a reload to navigation timing APIs`);
     15 </script>