Index: third_party/WebKit/LayoutTests/fast/css/invalidation/in-range-pseudo.html |
diff --git a/third_party/WebKit/LayoutTests/fast/css/invalidation/in-range-pseudo.html b/third_party/WebKit/LayoutTests/fast/css/invalidation/in-range-pseudo.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..491c14b5288593d3042f0ff9484ebfc5dcdf47d5 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/fast/css/invalidation/in-range-pseudo.html |
@@ -0,0 +1,20 @@ |
+<!DOCTYPE html> |
+<script src="../../../resources/testharness.js"></script> |
+<script src="../../../resources/testharnessreport.js"></script> |
+<style> |
+ #sibling { background-color: red } |
+ input:in-range + #sibling { background-color: green } |
+</style> |
+<div> |
+ <input id="input" type="number" min="1" max="10" value="20"> |
+ <span id="sibling">This text should have a green background</span> |
+</div> |
+<script> |
+ test(() => { |
+ assert_equals(getComputedStyle(sibling).backgroundColor, "rgb(255, 0, 0)", |
+ "Sibling background initially red."); |
+ input.setAttribute("value", "5"); |
+ assert_equals(getComputedStyle(sibling).backgroundColor, "rgb(0, 128, 0)", |
+ "Sibling green after input value becomes in range."); |
+ }, "Check that input.setAttribute('value') affects :in-range"); |
+</script> |