1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
6 function buildAccessibilityTree(accessibilityObject, indent) {
8 for (var i = 0; i < indent; i++)
10 str += accessibilityObject.role;
11 str += " " + accessibilityObject.stringValue;
13 document.getElementById("tree").innerText += str;
15 if (accessibilityObject.stringValue.indexOf('End of test') >= 0)
18 var count = accessibilityObject.childrenCount;
19 for (var i = 0; i < count; ++i) {
20 if (!buildAccessibilityTree(accessibilityObject.childAtIndex(i), indent + 1))
27 <script src="../resources/js-test.js"></script>
28 <script src="../resources/accessibility-helper.js"></script>
36 <a href="about:blank"><div></div></a>
38 <div>End of test</div>
40 <p id="description"></p>
41 <div id="console"></div>
44 description("This can cause a crash.");
46 if (window.accessibilityController) {
47 // First build up full accessibility tree.
48 document.getElementById("console").innerText += "Before:\n";
49 document.body.focus();
50 buildAccessibilityTree(accessibilityController.focusedElement, 0);
52 // Remove anchor that causes debug assert in AccessibilityRenderObject::addChildren
53 document.body.removeChild(document.body.children[2])
55 // Build up full accessibility tree again.
56 document.getElementById("console").innerText += "After:\n";
57 document.body.focus();
58 buildAccessibilityTree(accessibilityController.focusedElement, 0);