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> |