tor-browser

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

transition-duration-shorthand.html (1504B)


      1 <!doctype html>
      2 <link rel="help" href="https://drafts.csswg.org/css-transitions/#transition-duration-property">
      3 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1650189">
      4 <link rel="author" href="http://mellthas.de" title="Till Berger">
      5 <link rel="author" href="https://mozilla.org" title="Mozilla">
      6 <link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
      7 <script src="/resources/testharness.js" type="text/javascript"></script>
      8 <script src="/resources/testharnessreport.js" type="text/javascript"></script>
      9 <title>transition-duration when looking at shorthand properties should be correct</title>
     10 <style>
     11  div {
     12    width: 100px;
     13    height: 100px;
     14    background-color: green;
     15    transition: all 100s, height 0s;
     16  }
     17  div.trigger {
     18    width: 200px;
     19    height: 200px;
     20  }
     21 </style>
     22 <div></div>
     23 <script>
     24  promise_test(async function (t) {
     25    let div = document.querySelector("div");
     26    let cs = getComputedStyle(div);
     27    assert_equals(cs.width, "100px", "Width should start off correct");
     28    assert_equals(cs.height, "100px", "Height should start off correct");
     29 
     30    div.classList.add("trigger");
     31 
     32    await new Promise(resolve => {
     33      requestAnimationFrame(() => requestAnimationFrame(resolve));
     34    });
     35 
     36    assert_not_equals(cs.width, "200px", "Width should not have advanced to the end of the transition right away");
     37    assert_equals(cs.height, "200px", "Height should have advanced to the end of the transition right away");
     38  });
     39 </script>