tor-browser

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

testcommon.js (701B)


      1 'use strict';
      2 
      3 /**
      4 * Returns a Promise that is resolved after a CSS scroll timeline is created (as
      5 * the result of a style change) and a snapshot has been taken, so that the
      6 * animation style is correctly reflected by getComputedStyle().
      7 * Technically, this only takes a full frame update. We implement this as two
      8 * requestAnimationFrame callbacks because the result will be available at the
      9 * beginning of the second frame.
     10 */
     11 async function waitForCSSScrollTimelineStyle() {
     12  await waitForNextFrame();
     13  await waitForNextFrame();
     14 }
     15 
     16 function assert_implements_animation_timeline() {
     17  assert_implements(CSS.supports('animation-timeline:--foo'),
     18      'animation-timeline not supported');
     19 }