tor-browser

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

user-modify-03.html (1067B)


      1 <!DOCTYPE html>
      2 <meta charset="utf-8">
      3 <title>user-modify should be unsupported in CSS.supports</title>
      4 <link rel="help" href="https://developer.mozilla.org/en-US/docs/Web/CSS/user-modify">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 <style>
      8 @supports (user-modify: read-only) {
      9    #content {
     10        width: 10px;
     11        height: 10px;
     12        background-color: red;
     13    }
     14 }
     15 </style>
     16 <div id="content"></div>
     17 <script>
     18    test(function() {
     19        const content = document.getElementById('content');
     20        assert_not_equals(getComputedStyle(content).getPropertyValue('background-color'), 'rgb(255, 0, 0)');
     21    }, '@supports doesn\'t use unsupported user-modify property');
     22 
     23    test(function() {
     24        const supportsUserModifyProperty = CSS.supports(`(user-modify: read-only) or
     25            (user-modify: read-write) or
     26            (user-modify: write-only)`);
     27        assert_equals(supportsUserModifyProperty, false);
     28    }, 'CSS.supports doesn\'t use unsupported user-modify property');
     29 </script>