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

Unified Diff: LayoutTests/accessibility/input-slider-change-value-by-percent.html

Issue 1071873004: Changing slider values do not work properly when percent change of a step is less than one. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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
Index: LayoutTests/accessibility/input-slider-change-value-by-percent.html
diff --git a/LayoutTests/accessibility/input-slider-change-value-by-percent.html b/LayoutTests/accessibility/input-slider-change-value-by-percent.html
new file mode 100644
index 0000000000000000000000000000000000000000..d6bdfd1f9f9f7f13d9b8cf1bcfb07b359723fd86
--- /dev/null
+++ b/LayoutTests/accessibility/input-slider-change-value-by-percent.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+<script src="../resources/js-test.js"></script>
+</head>
+<body>
+
+<input id="range1" type="range" min="0" max="100" value="50">
+<input id="range2" type="range" min="0" max="10" value="5">
+
+<script>
+
+description("Check whether changing slider's value without step attribute works properly");
+
+if (window.accessibilityController) {
+ // Checking whether step is greater than one
+ var range1 = accessibilityController.accessibleElementById("range1");
+ shouldBe("range1.intValue", "50");
+ range1.increment();
+ shouldBe("range1.intValue", "55");
+ range1.increment();
+ shouldBe("range1.intValue", "60");
+ range1.decrement();
+ shouldBe("range1.intValue", "55");
+ range1.increment();
+ shouldBe("range1.intValue", "60");
+
+ // Checking whether step is less than one
+ var range2 = accessibilityController.accessibleElementById("range2");
+ shouldBe("range2.intValue", "5");
+ range2.increment();
+ shouldBe("range2.intValue", "6");
+ range2.increment();
+ shouldBe("range2.intValue", "7");
+ range2.decrement();
+ shouldBe("range2.intValue", "6");
+ range2.increment();
+ shouldBe("range2.intValue", "7");
+}
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698