Index: LayoutTests/accessibility/aria-tables.html |
diff --git a/LayoutTests/accessibility/aria-tables.html b/LayoutTests/accessibility/aria-tables.html |
index 06029a1b197bd57590bfbf75547c26fb97375ab5..893934f0c831a0fd1e40fdedf8ee2dc6784aa5b7 100644 |
--- a/LayoutTests/accessibility/aria-tables.html |
+++ b/LayoutTests/accessibility/aria-tables.html |
@@ -1,4 +1,5 @@ |
<script src="../resources/js-test.js"></script> |
+<script src="../resources/accessibility-helper.js"></script> |
<body id="body"> |
<div role="grid"> |
<div role="row"> |
@@ -22,27 +23,8 @@ |
<p id="description"></p> |
<div id="console"></div> |
<script> |
- function buildAccessibilityTree(accessibilityObject, i) { |
- if(accessibilityObject.stringValue.indexOf('End of test') >= 0) |
- return false; |
- |
- if (accessibilityObject.role == 'AXRole: AXColumn' || accessibilityObject.role == 'AXRole: AXTableHeaderContainer') |
- return true; |
- |
- var indent = ""; |
- for (var k = 0; k < i; k++) |
- indent += " "; |
- debug(indent + accessibilityObject.role + " " + accessibilityObject.stringValue); |
- var childrenCount = accessibilityObject.childrenCount; |
- for (var j = 0; j < childrenCount; j++) { |
- if (!buildAccessibilityTree(accessibilityObject.childAtIndex(j), i + 1)) |
- return false; |
- } |
- return true; |
- } |
- |
if (window.accessibilityController) { |
document.getElementById("body").focus(); |
- buildAccessibilityTree(accessibilityController.focusedElement, 0); |
+ buildAccessibilityTree(accessibilityController.focusedElement, 0, 1, ['AXColumn', 'AXTableHeaderContainer']); |
} |
</script> |