tor-browser

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

cyclic-syncbase-events.html (1173B)


      1 <!DOCTYPE html>
      2 <title>Cyclic syncbase dependency with syncbase trigger - event dispatching</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <svg>
      6  <rect width="100" height="100" fill="blue">
      7    <animate attributeName="fill" from="yellow" to="blue" id="a"
      8             begin="c.end; b.begin" dur="10ms"/>
      9  </rect>
     10  <rect width="100" height="100" x="100" fill="blue">
     11    <animate attributeName="fill" from="yellow" to="blue" id="b"
     12             begin="c.end; a.begin" dur="10ms"/>
     13  </rect>
     14  <rect width="100" height="100" x="200" fill="blue">
     15    <animate attributeName="fill" from="yellow" to="blue" id="c"
     16             begin="0; 15ms" dur="10ms"/>
     17  </rect>
     18 </svg>
     19 <script>
     20  promise_test(function(t) {
     21    // Wait for two beginEvent/endEvent pairs on all the timed elements.
     22    let promises = ['a', 'b', 'c'].map(function(id) {
     23      return new EventWatcher(t, document.getElementById(id),
     24                              ['beginEvent', 'endEvent'])
     25        .wait_for(['beginEvent', 'endEvent',
     26                   'beginEvent', 'endEvent']);
     27    });
     28    return Promise.all(promises);
     29  });
     30 </script>