blob: a4b47389e1bfdee3824c10177b35df2a73093824 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body id="body">
<table>
<tr><td>foo</td><td>bar</td></tr>
</table>
<table>
<tr><th>Odd</th><th>Even</th></tr>
<tr><td>1</td><td>2</td></tr>
<tr><td>3</td><td>4</td></tr>
</table>
<table>
<tbody>
<tr><td>hello</td><td>world</td></tr>
</tbody>
</table>
<table border=1>
<tr><th>Odd</th><th>Even</th></tr>
<tr><td><p>1</p></td><td><p>2</p></td></tr>
<tr><td><p>3</p></td><td><p>4</p></td></tr>
</table>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests the Atk table hierarhy.");
if (window.accessibilityController) {
testRunner.dumpAsText();
document.getElementById("body").focus();
var webArea = accessibilityController.focusedElement;
var table1 = webArea.childAtIndex(0);
shouldBe("table1.role", "'AXRole: AXTable'");
shouldBe("table1.rowCount", "1");
shouldBe("table1.columnCount", "2");
var table2 = webArea.childAtIndex(1);
shouldBe("table2.role", "'AXRole: AXTable'");
shouldBe("table2.rowCount", "3");
shouldBe("table2.columnCount", "2");
var table3 = webArea.childAtIndex(2);
shouldBe("table3.role", "'AXRole: AXTable'");
shouldBe("table3.rowCount", "1");
shouldBe("table3.columnCount", "2");
var table4 = webArea.childAtIndex(3);
shouldBe("table4.role", "'AXRole: AXTable'");
shouldBe("table4.rowCount", "3");
shouldBe("table4.columnCount", "2");
var children = table1.childrenCount;
shouldBe("children", "2");
for (i = 0; i < children; ++i) {
shouldBe("table1.childAtIndex(i).role", "'AXRole: AXCell'");
}
children = table2.childrenCount;
shouldBe("children", "6");
for (i = 0; i < children; ++i) {
shouldBe("table2.childAtIndex(i).role", "'AXRole: AXCell'");
}
children = table3.childrenCount;
shouldBe("children", "2");
for (i = 0; i < children; ++i) {
shouldBe("table3.childAtIndex(i).role", "'AXRole: AXCell'");
}
children = table4.childrenCount;
shouldBe("children", "6");
for (i = 0; i < children; ++i) {
shouldBe("table4.childAtIndex(i).role", "'AXRole: AXCell'");
}
}
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>