Index: LayoutTests/fast/css/invalidation/indeterminate-pseudo.html |
diff --git a/LayoutTests/fast/css/invalidation/indeterminate-pseudo.html b/LayoutTests/fast/css/invalidation/indeterminate-pseudo.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3dad0790c2991f90c8d6f445f1a5043469a28840 |
--- /dev/null |
+++ b/LayoutTests/fast/css/invalidation/indeterminate-pseudo.html |
@@ -0,0 +1,30 @@ |
+<!DOCTYPE html> |
+<script src="../../../resources/js-test.js"></script> |
+<style> |
+:indeterminate { background-color: green } |
+input + div { color: pink } |
+</style> |
+<input id="checkbox" type="checkbox"></input> |
+<div> |
+ <div></div> |
+ <div></div> |
+ <div></div> |
+ <div></div> |
+</div> |
+<script> |
+description("Use descendant invalidation set for :indeterminate pseudo class.") |
+ |
+var transparent = "rgba(0, 0, 0, 0)"; |
+var green = "rgb(0, 128, 0)"; |
+ |
+shouldBe("getComputedStyle(checkbox, '').backgroundColor", "transparent"); |
+ |
+checkbox.offsetTop; // Force recalc. |
+ |
+checkbox.indeterminate = true; |
+ |
+if (window.internals) |
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); |
+ |
+shouldBe("getComputedStyle(checkbox, '').backgroundColor", "green"); |
+</script> |