tor-browser

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

worklet-animation-animator-name.https.html (971B)


      1 <!DOCTYPE html>
      2 
      3 <title>Worklet Animation's animator name should be accessible via animatorName property</title>
      4 <link rel="help" href="https://drafts.css-houdini.org/css-animationworklet/">
      5 
      6 <script src="/resources/testharness.js"></script>
      7 <script src="/resources/testharnessreport.js"></script>
      8 <script src="common.js"></script>
      9 
     10 <script id="test_animator" type="text/worklet">
     11  class NoopAnimator {
     12    animate(currentTime, effect) {}
     13  }
     14  registerAnimator('Tokyo', NoopAnimator);
     15  registerAnimator('دزفول', NoopAnimator);
     16 </script>
     17 
     18 <body></body>
     19 
     20 <script>
     21 promise_test(async t => {
     22  await runInAnimationWorklet(document.getElementById('test_animator').textContent);
     23 
     24  // An ascii name and a non-ascii one.
     25  for (let name of ['Tokyo', 'دزفول']) {
     26    const animation = new WorkletAnimation(name, new KeyframeEffect(document.body, {}));
     27    assert_equals(name, animation.animatorName);
     28  }
     29 }, 'Verify that animatorName matches passed name');
     30 </script>