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

Unified Diff: third_party/WebKit/LayoutTests/fast/forms/range/ValidityState-stepMismatch-range.html

Issue 2366753004: input[type=range]: Updating step attribute should align the value to steps. (Closed)
Patch Set: Created 4 years, 3 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/LayoutTests/fast/forms/range/ValidityState-stepMismatch-range-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/forms/range/ValidityState-stepMismatch-range.html
diff --git a/third_party/WebKit/LayoutTests/fast/forms/range/ValidityState-stepMismatch-range.html b/third_party/WebKit/LayoutTests/fast/forms/range/ValidityState-stepMismatch-range.html
index 8b3b38503b17a5fc983269484f1a519b3d988d40..82aa78c0c8b6a6ca9b28a6cabd8c32890c663ee0 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/range/ValidityState-stepMismatch-range.html
+++ b/third_party/WebKit/LayoutTests/fast/forms/range/ValidityState-stepMismatch-range.html
@@ -35,6 +35,16 @@ input.max = '';
shouldBe('stepMismatchFor("-3", "-2", "-4")', 'false');
shouldBe('stepMismatchFor("-3", null, "-4")', 'false');
shouldBe('stepMismatchFor("-3", undefined, "-4")', 'false');
+
+debug('Updating step attribute');
+stepMismatchFor('50', '10', '0');
+shouldBeEqualToString('input.value', '50');
+shouldBeEqualToString('input.step = "15"; input.value', '45');
+shouldBeEqualToString('input.step = "20"; input.value', '40');
+stepMismatchFor('50', '10', '0');
+shouldBeEqualToString('input.value = "5", input.value', '10');
+shouldBeEqualToString('input.step = "6"; input.value', '12');
+
debug('Huge numbers and small step; uncomparable');
shouldBe('stepMismatchFor("3.40282347e+38", "3", "")', 'false');
shouldBe('stepMismatchFor("3.40282346e+38", "3", "")', 'false');
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/forms/range/ValidityState-stepMismatch-range-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698