tor-browser

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

inert-does-not-match-disabled-selector.html (618B)


      1 <!DOCTYPE html>
      2 <html>
      3 <head>
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <style>
      7 button {
      8    color: green;
      9 }
     10 
     11 button:disabled {
     12    color: red;
     13 }
     14 
     15 </style>
     16 </head>
     17 <body style="color: green">
     18 <button inert>The test passes if this is in green.</button>
     19 <script>
     20 test(function() {
     21    button = document.querySelector('button');
     22    color = document.defaultView.getComputedStyle(button).getPropertyValue('color');
     23    assert_false(button.matches(':disabled'));
     24 }, 'Tests that inert elements do not match the :disabled selector.');
     25 </script>
     26 </body>
     27 </html>