tor-browser

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

audio-controls-intrinsic-size.html (829B)


      1 <!doctype html>
      2 <title>Audio intrinsic size doesn't depend on its max size</title>
      3 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1683979">
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <div style="display: inline-block">
      7  <audio controls style="max-width: 99%" id="test"></audio>
      8 </div>
      9 <script>
     10 let audio = document.getElementById("test");
     11 
     12 function computeSize() {
     13  return audio.getBoundingClientRect().width;
     14 }
     15 
     16 let size = computeSize();
     17 async_test(function(t) {
     18  requestAnimationFrame(t.step_func(function() {
     19    assert_equals(computeSize(), size, "Shouldn't have changed size");
     20    requestAnimationFrame(t.step_func_done(function() {
     21      assert_equals(computeSize(), size, "Shouldn't have changed size");
     22    }));
     23  }));
     24 });
     25 </script>