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