tor-browser

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

integer_interpolation_round_half_001.html (1085B)


      1 <!doctype html>
      2 <title>Testing if integer interpolation is rounded towards positive infinity</title>
      3 <link rel="author" title="Joonghun Park" href="pjh0718@gmail.com">
      4 <link rel="help" href="https://drafts.csswg.org/css-values-4/#combine-integers">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <style>
      8 
      9 #flex-container {
     10    display: flex;
     11    animation: anim-order 4s steps(4) forwards 1;
     12    animation-delay: -1s;
     13    animation-play-state: paused;
     14 }
     15 
     16 @keyframes anim-order {
     17  from {
     18    order: -2;
     19  }
     20 
     21  to {
     22    order: 0;
     23  }
     24 }
     25 
     26 </style>
     27 <div id="flex-container"></div>
     28 <script>
     29 var test_description = "Integer interpolation should be rounded towards positive infinity";
     30 test(
     31    t => {
     32        const container = document.getElementById("flex-container");
     33        const order_value = Number.parseFloat(getComputedStyle(container).getPropertyValue('order'));
     34 
     35        assert_equals(order_value, -1, "Interpolation result for order should be rounded towards positive infinity");
     36    },
     37    test_description
     38 );
     39 </script>