blob: 5b4adf6cd35fe4bc5fb33498b6b96d288241f8b5 [file] [log] [blame] [edit]
<!DOCTYPE HTML>
<html>
<head>
<script src="../resources/accessibility-helper.js"></script>
<script src="../resources/js-test.js"></script>
</head>
<body>
<style>
ol li::before { content: counter(l1) ":"; counter-increment: l1; }
ol li { list-style-type: decimial; display: block; }
</style>
<div id="container" style="counter-reset:l1;">
<ol style="list-style-type:decimal">
<li id="line1">line1
<li id="line2">line2
<li>line3
</ol>
</div>
<script>
let output = "This tests that the text for RenderCounter is exposed correctly.\n\n";
if (window.accessibilityController) {
var line1 = accessibilityController.accessibleElementById("line1");
if (accessibilityController.platformName != "atspi") {
output += expect("line1.childAtIndex(0).stringValue", "'AXValue: 1'");
output += expect("line1.childAtIndex(1).stringValue", "'AXValue: :'");
output += expect("line1.childAtIndex(2).stringValue", "'AXValue: line1'");
} else
output += expect("line1.stringValue", "'AXValue: 1:line1'");
var line2 = accessibilityController.accessibleElementById("line2");
if (accessibilityController.platformName != "atspi") {
output += expect("line2.childAtIndex(0).stringValue", "'AXValue: 2'");
output += expect("line2.childAtIndex(1).stringValue", "'AXValue: :'");
output += expect("line2.childAtIndex(2).stringValue", "'AXValue: line2'");
} else
output += expect("line2.stringValue", "'AXValue: 2:line2'");
document.getElementById("container").style.display = "none";
debug(output);
}
</script>
</body>
</html>