Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/in-range-pseudo.html

Issue 2764023003: Updating :in-range should not rely on validation. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698