tor-browser

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

resource-selection-resumes-onload.html (753B)


      1 <!doctype html>
      2 <title>resource selection should not delay the load event indefinitely</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <div id=log></div>
      6 <video></video>
      7 <script>
      8 async_test(function(t) {
      9  const v = document.querySelector('video');
     10  v.onloadstart = t.unreached_func("loadstart event should not be fired when the resource selection algorithm cannot determine mode");
     11  const s = document.createElement('source');
     12  v.appendChild(s); // this will trigger resource selection
     13  v.removeChild(s); // force an early return in resource selection algorithm
     14  window.onload = t.step_func_done(function() {
     15    assert_equals(v.networkState, v.NETWORK_EMPTY);
     16  });
     17 });
     18 </script>