tor-browser

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

test_transitions_at_start.html (1006B)


      1 <!doctype html>
      2 <html>
      3 <!--
      4 https://bugzilla.mozilla.org/show_bug.cgi?id=1380133
      5 -->
      6 <head>
      7  <meta charset=utf-8>
      8  <title>Test for transition value at start (Bug 1380133)</title>
      9  <script src="/resources/testharness.js"></script>
     10  <script src="/resources/testharnessreport.js"></script>
     11  <link rel="stylesheet" href="/resources/testharness.css">
     12  <style>
     13    a {
     14      color: red;
     15      transition: 100s color;
     16    }
     17    a.active {
     18      color: blue;
     19    }
     20  </style>
     21 </head>
     22 <body>
     23 <a id=anchor><span id=span>Test</span></a>
     24 </body>
     25 <script>
     26 'use strict';
     27 
     28 const anchor = document.getElementById('anchor');
     29 const span   = document.getElementById('span');
     30 
     31 test(() => {
     32  anchor.getBoundingClientRect();
     33  anchor.classList.add('active');
     34  assert_equals(getComputedStyle(span).color, 'rgb(255, 0, 0)',
     35                'The child of a transitioning element should inherit its'
     36                + ' parent\'s transition start value');
     37 }, 'Transition start value should be inherited');
     38 </script>
     39 </html>