Move platform/mac/accessibility tests to accessibility/mac.
[WebKit-https.git] / LayoutTests / accessibility / mac / table-column-and-row-count.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test-pre.js"></script>
5 <title>Table Column and Row Count</title>
6 </head>
7 <body>
8
9 <!-- ARIA table. -->
10 <div class="test" id="t0" role="grid">
11 <div role="row">
12 <span role="columnheader">Bill</span>
13 <span role="columnheader">Ted</span>
14 </div>
15 <div role="row">
16 <span role="gridcell">100</span>
17 <span role="gridcell">99</span>
18 </div>
19 </div>
20
21 <br>
22
23 <!-- HTML table. -->
24 <table class="test" id="t1">
25 <tr>
26 <th>Bill</th>
27 <th>Ted</th>
28 </tr>
29 <tr>
30 <td>100</td>
31 <td>99</td>
32 </tr>
33 <table>
34
35 <p id="description"></p>
36 <div id="console"></div>
37
38 <script>
39     description("This tests that tables return their column and row count correctly.");
40     
41     if (window.accessibilityController) {
42         var testCount = document.getElementsByClassName("test").length;
43         for (var i = 0; i < testCount; ++i) {
44             var test = accessibilityController.accessibleElementById("t" + i);
45             var columnCount = test.numberAttributeValue("AXColumnCount");
46             shouldBe("columnCount", "2");
47             
48             var rowCount = test.numberAttributeValue("AXRowCount");
49             shouldBe("rowCount", "2");
50         }
51     }
52 </script>
53
54 <script src="../../resources/js-test-post.js"></script>
55 </body>
56 </html>