blob: daa639e0f9578f2d2c1698df23b6204fe84f1e7c [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 tree.
<div contentEditable="true">
<span>1<div role="group">2</div>3</span>
<div role="group">5</div>
function NonGroupDescendants(elt) {
let result = 0;
let count = elt.childrenCount;
for (let i = 0; i < count; ++i) {
child = elt.childAtIndex(i);
if (child.role != 'AXRole: AXGroup' &&
child.role != 'AXRole: AXInlineTextBox' &&
child.role != 'AXRole: AXGenericContainer') {
result += NonGroupDescendants(child);
return result;
if (window.accessibilityController) {
// The layout engine inserts an additional static text element containing a
// space between "3" and "4".
shouldBe('NonGroupDescendants(accessibilityController.focusedElement)', '6');