webkit-user-modify-03.html (1199B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>-webkit-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 (-webkit-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 -webkit-user-modify property'); 22 23 test(function() { 24 const supportsWebkitUserModifyProperty = CSS.supports(`(-webkit-user-modify: read-only) or 25 (-webkit-user-modify: read-write) or 26 (-webkit-user-modify: read-write-plaintext-only) or 27 (-webkit-user-modify: write-only)`); 28 assert_equals(supportsWebkitUserModifyProperty, false); 29 }, 'CSS.supports doesn\'t use unsupported -webkit-user-modify property'); 30 </script>