indeterminate-radio.html (838B)
1 <!DOCTYPE HTML> 2 <meta charset="utf-8"> 3 <title>:indeterminate and input type=radio</title> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <style type="text/css"> 7 #test { 8 color: green; 9 } 10 input:indeterminate + #test { 11 color: red; 12 } 13 </style> 14 <input type="radio" name="radios"> 15 <div id="test"></div> 16 <input type="radio" name="radios" checked> 17 <script type="text/javascript"> 18 test(function() { 19 document.getElementsByTagName("input")[0].indeterminate = true; 20 var target = document.getElementById("test"); 21 var val = getComputedStyle(target, null).getPropertyValue("color"); 22 assert_equals(val, "rgb(0, 128, 0)", 23 "The indeterminate IDL attribute should not cause the " + 24 ":indeterminate pseudo-class to match on input type=radio"); 25 }) 26 </script>