haikuwebkit/LayoutTests/accessibility/range-alter-by-step.html

58 lines
1.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body id="body">
<input type="range" min="0" max="100" value="25" step="25" id="range1"/>
<p id="description"></p>
<div id="console"></div>
<script>
description("This test makes sure that if a range type has a step value, that increment and decrement work.");
if (window.accessibilityController) {
// ARIA determinate progressbar
document.getElementById("range1").focus();
var obj = accessibilityController.focusedElement;
shouldBe("obj.intValue", "25");
obj.increment();
shouldBe("obj.intValue", "50");
obj.increment();
shouldBe("obj.intValue", "75");
obj.increment();
shouldBe("obj.intValue", "100");
obj.increment();
shouldBe("obj.intValue", "100");
obj.decrement();
shouldBe("obj.intValue", "75");
obj.decrement();
shouldBe("obj.intValue", "50");
obj.decrement();
shouldBe("obj.intValue", "25");
obj.decrement();
shouldBe("obj.intValue", "0");
obj.decrement();
shouldBe("obj.intValue", "0");
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>