blob: a8193b8dac4beede22e7e78df78feffc0ea9d45b [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test.js"></script>
<script src="../resources/accessibility-helper.js"></script>
</head>
<body>
<span tabindex="0" role="progressbar" id="progressbar1" aria-valuenow=7 aria-valuemin=0 aria-valuemax=10>X</span>
<span tabindex="0" role="progressbar" id="progressbar2" aria-valuemax=10>X</span>
<progress tabindex="0" id="progressbar3" value=7 max=10></progress>
<progress tabindex="0" id="progressbar4"></progress>
<script>
description("This test makes sure that progress element can be accessed by Accessibility FW.");
var progressbar1, progressbar2, progressbar3, progressbar4;
if (window.accessibilityController) {
// ARIA determinate progressbar
progressbar1 = accessibilityController.accessibleElementById("progressbar1");
shouldBe("progressbar1.intValue", "7");
// ARIA indeterminate progressbar
progressbar2 = accessibilityController.accessibleElementById("progressbar2");
shouldBe("progressbar2.intValue", "5");
// Determinate progress element
progressbar3 = accessibilityController.accessibleElementById("progressbar3");
shouldBe("progressbar3.intValue", "7");
shouldBe("progressbar3.role", "'AXRole: AXProgressIndicator'");
// Indeterminate progress element
progressbar4 = accessibilityController.accessibleElementById("progressbar4");
shouldBe("progressbar4.intValue", "0");
shouldBe("progressbar4.role", "'AXRole: AXProgressIndicator'");
}
</script>
</body>
</html>