tor-browser

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

seeking-events-1.html (940B)


      1 <!DOCTYPE html>
      2 <title>Seeking forwards does not dispatch events for skipped elements</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <svg>
      6  <rect width="50" height="100" fill="red">
      7    <set id="anim1" attributeName="fill" to="green" begin="5s" dur="1s" repeatCount="2" fill="freeze"/>
      8  </rect>
      9  <rect width="50" height="100" x="50" fill="red">
     10    <set id="anim2" attributeName="fill" to="green" begin="9s" dur="11s"/>
     11  </rect>
     12 </svg>
     13 <script>
     14  const SMIL_EVENTS = ['beginEvent', 'repeatEvent', 'endEvent'];
     15 
     16  promise_test(function(t) {
     17    let svg = document.querySelector('svg');
     18    svg.pauseAnimations();
     19    svg.setCurrentTime(10);
     20    new EventWatcher(t, document.getElementById('anim1'), SMIL_EVENTS);
     21    let anim2_watcher = new EventWatcher(t, document.getElementById('anim2'), SMIL_EVENTS);
     22    return anim2_watcher.wait_for('beginEvent');
     23  });
     24 </script>