tor-browser

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

animation-timeline-computed.html (3986B)


      1 <!DOCTYPE html>
      2 <link rel="help" href="https://drafts.csswg.org/scroll-animations-1/#animation-timeline">
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script src="/css/support/computed-testcommon.js"></script>
      6 </head>
      7 <style>
      8  #outer { animation-timeline: --foo; }
      9  #target { animation-timeline: --bar; }
     10 </style>
     11 <div id="outer">
     12  <div id="target"></div>
     13 </div>
     14 <script>
     15 test_computed_value('animation-timeline', 'initial', 'auto');
     16 test_computed_value('animation-timeline', 'inherit', '--foo');
     17 test_computed_value('animation-timeline', 'unset', 'auto');
     18 test_computed_value('animation-timeline', 'revert', 'auto');
     19 test_computed_value('animation-timeline', 'auto');
     20 test_computed_value('animation-timeline', 'none');
     21 test_computed_value('animation-timeline', 'auto, auto');
     22 test_computed_value('animation-timeline', 'none, none');
     23 test_computed_value('animation-timeline', 'auto, none');
     24 test_computed_value('animation-timeline', 'none, auto');
     25 test_computed_value('animation-timeline', '--test');
     26 test_computed_value('animation-timeline', '--test1, --test2');
     27 test_computed_value('animation-timeline', '--test1, --test2, none, --test3, auto');
     28 
     29 test(() => {
     30  let style = getComputedStyle(document.getElementById('target'));
     31  assert_not_equals(Array.from(style).indexOf('animation-timeline'), -1);
     32 }, 'The animation-timeline property shows up in CSSStyleDeclaration enumeration');
     33 
     34 test(() => {
     35  let style = document.getElementById('target').style;
     36  assert_not_equals(style.cssText.indexOf('animation-timeline'), -1);
     37 }, 'The animation-timeline property shows up in CSSStyleDeclaration.cssText');
     38 
     39 // https://drafts.csswg.org/scroll-animations-1/#scroll-notation
     40 //
     41 // animation-timeline: scroll(<axis>? <scroller>?);
     42 // <axis> = block | inline | x | y
     43 // <scroller> = root | nearest | self
     44 test_computed_value('animation-timeline', 'scroll()');
     45 test_computed_value('animation-timeline', 'scroll(block)', 'scroll()');
     46 test_computed_value('animation-timeline', 'scroll(inline)');
     47 test_computed_value('animation-timeline', 'scroll(x)');
     48 test_computed_value('animation-timeline', 'scroll(y)');
     49 test_computed_value('animation-timeline', 'scroll(root)');
     50 test_computed_value('animation-timeline', 'scroll(nearest)', 'scroll()');
     51 test_computed_value('animation-timeline', 'scroll(self)');
     52 test_computed_value('animation-timeline', 'scroll(self), scroll(nearest)', 'scroll(self), scroll()');
     53 test_computed_value('animation-timeline', 'scroll(inline nearest)', 'scroll(inline)');
     54 test_computed_value('animation-timeline', 'scroll(nearest inline)', 'scroll(inline)');
     55 test_computed_value('animation-timeline', 'scroll(block self)', 'scroll(self)');
     56 test_computed_value('animation-timeline', 'scroll(self block)', 'scroll(self)');
     57 test_computed_value('animation-timeline', 'scroll(y root)', 'scroll(root y)');
     58 
     59 // https://drafts.csswg.org/scroll-animations-1/#view-notation
     60 test_computed_value('animation-timeline', 'view()');
     61 test_computed_value('animation-timeline', 'view(block)', 'view()');
     62 test_computed_value('animation-timeline', 'view(inline)', 'view(inline)');
     63 test_computed_value('animation-timeline', 'view(x)', 'view(x)');
     64 test_computed_value('animation-timeline', 'view(y)', 'view(y)');
     65 test_computed_value('animation-timeline', 'view(y 1px)');
     66 test_computed_value('animation-timeline', 'view(1px auto)');
     67 test_computed_value('animation-timeline', 'view(auto 1px)');
     68 test_computed_value('animation-timeline', 'view(y 1px auto)');
     69 test_computed_value('animation-timeline', 'view(1px y)', 'view(y 1px)');
     70 test_computed_value('animation-timeline', 'view(y auto)', 'view(y)');
     71 test_computed_value('animation-timeline', 'view(y auto auto)', 'view(y)');
     72 test_computed_value('animation-timeline', 'view(10% 10px)', 'view(10% 10px)');
     73 test_computed_value('animation-timeline', 'view(auto calc(1% + 1px))');
     74 test_computed_value('animation-timeline', 'view(2em calc(1% + 1em))', 'view(32px calc(1% + 16px))');
     75 
     76 </script>