blob: 41473cbafbd267addb9f98e6db8b30f71048eb64 [file] [log] [blame]
<!DOCTYPE html>
<title>Inline continuations - accessibility tree linkage</title>
<script src="../resources/js-test.js"></script>
if (window.testRunner)
<h2>Inline continuations - accessibility tree linkage</h2>
<p>This test checks that the right accessibility tree is generated in
the presence of inline continuations. Each of the five numbers
below should be visited only ones traversing the accessibility
<div contentEditable="true" id="test"><span>1<div role="group">2</div>3</span><span>4</span><div role="group">5</div></div>
<div id="console"></div>
function nonGroupDescendants(elt)
var result = 0;
var count = elt.childrenCount;
for (var i = 0; i < count; ++i) {
var child = elt.childAtIndex(i);
if (child.role != 'AXRole: AXGroup' && child.role != 'AXRole: AXInlineTextBox')
result += nonGroupDescendants(child);
return result;
if (window.accessibilityController) {
var result = document.getElementById("result");
shouldBe("nonGroupDescendants(accessibilityController.focusedElement)", "5");
// This should pass (and is a simpler test than above) if anonymous blocks were not in the AX tree
// shouldBe("accessibilityController.focusedElement.childrenCount", "5");