summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/selectors/pseudo-classes/indeterminate-radio.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/semantics/selectors/pseudo-classes/indeterminate-radio.html')
-rw-r--r--testing/web-platform/tests/html/semantics/selectors/pseudo-classes/indeterminate-radio.html26
1 files changed, 26 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/semantics/selectors/pseudo-classes/indeterminate-radio.html b/testing/web-platform/tests/html/semantics/selectors/pseudo-classes/indeterminate-radio.html
new file mode 100644
index 0000000000..4a7b2d6ece
--- /dev/null
+++ b/testing/web-platform/tests/html/semantics/selectors/pseudo-classes/indeterminate-radio.html
@@ -0,0 +1,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>