blob: b7ccafdd02878a52bb635f3f6e67a25a2b7cd96a [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<title>Table Column and Row Count</title>
</head>
<body>
<!-- ARIA table. -->
<div class="test" id="t0" role="grid">
<div role="row">
<span role="columnheader">Bill</span>
<span role="columnheader">Ted</span>
</div>
<div role="row">
<span role="gridcell">100</span>
<span role="gridcell">99</span>
</div>
</div>
<br>
<!-- HTML table. -->
<table class="test" id="t1">
<tr>
<th>Bill</th>
<th>Ted</th>
</tr>
<tr>
<td>100</td>
<td>99</td>
</tr>
<table>
<p id="description"></p>
<div id="console"></div>
<script>
description("This tests that tables return their column and row count correctly.");
if (window.accessibilityController) {
var testCount = document.getElementsByClassName("test").length;
for (var i = 0; i < testCount; ++i) {
var test = accessibilityController.accessibleElementById("t" + i);
var columnCount = test.numberAttributeValue("AXColumnCount");
shouldBe("columnCount", "2");
var rowCount = test.numberAttributeValue("AXRowCount");
shouldBe("rowCount", "2");
}
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>