Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / table-cells.html
bloba31b20b38183224961ba73a3b1cb81ff94c723cc
1 <html>
2 <script>
3 if (window.testRunner)
4 testRunner.dumpAsText();
5 </script>
6 <body id="body">
9 <table id="testTable" align="center" border="1" cellpadding="5" cellspacing="0">
10 <caption> Example #1: Nested Stubs </caption>
11 <tr>
12 <th class="center" colspan="2" rowspan="2">Ruritanian<br> Population
13 <br> Survey</th>
14 <th class="center" rowspan="2">All<br> Genders</th>
16 <th class="center" colspan="2">By Gender</th>
17 </tr>
18 <tr>
19 <th class="center">Males</th>
20 <th class="center">Females</th>
21 </tr>
22 <tr>
24 <th align="left" rowspan="2">All Regions</th>
25 <th>North</th>
26 <td align="right">3333</td>
27 <td align="right">1111</td>
28 <td align="right">2222</td>
29 </tr>
31 <tr>
32 <th>South</th>
33 <td align="right">3333</td>
34 <td align="right">1111</td>
35 <td align="right">2222</td>
36 </tr>
37 <tr>
38 <th>South</th>
39 <td align="right">3333</td>
40 <td align="right" colspan="2">1111</td>
41 <td align="right">2222</td>
42 </tr>
43 <tr>
44 <th>South</th>
45 <td align="right" colspan="2">3333</td>
46 <td align="right">1111</td>
47 <td align="right">2222</td>
48 </tr>
49 </table>
51 <div id="result"></div>
53 <script>
54 if (window.accessibilityController) {
55 var result = document.getElementById("result");
57 var body = document.getElementById("body");
58 body.focus();
59 var table = accessibilityController.focusedElement.childAtIndex(0);
61 result.innerText += "------------------------\n";
62 result.innerText += "[0,0]\n" + table.cellForColumnAndRow(0,0).allAttributes() + "\n";
63 result.innerText += "------------------------\n";
64 result.innerText += "[3,1]\n" + table.cellForColumnAndRow(3,1).allAttributes() + "\n";
65 result.innerText += "------------------------\n";
66 result.innerText += "[1,1]\n" + table.cellForColumnAndRow(1,1).allAttributes() + "\n";
67 result.innerText += "------------------------\n";
68 result.innerText += "[2,2]\n" + table.cellForColumnAndRow(2,2).allAttributes() + "\n";
69 result.innerText += "------------------------\n";
70 result.innerText += "[3,5]\n" + table.cellForColumnAndRow(3,5).allAttributes() + "\n";
71 result.innerText += "------------------------\n";
72 result.innerText += "[100,0]\n";
73 outOfRangeCell = table.cellForColumnAndRow(100,0);
74 result.innerText += outOfRangeCell != null ? outOfRangeCell.allAttributes() : "";
75 result.innerText += "\n";
76 result.innerText += "------------------------\n";
77 outOfRangeCell = table.cellForColumnAndRow(0,100);
78 result.innerText += "[0,100]\n";
79 result.innerText += outOfRangeCell != null ? outOfRangeCell.allAttributes() : "";
80 result.innerText += "\n";
82 </script>
83 </body>
84 </html>