REGRESSION(r184899): Crash when focusing an input element styled with a web font
[WebKit-https.git] / LayoutTests / accessibility / mac / table-headers-attribute.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="../../resources/js-test-pre.js"></script>
6 </head>
7 <body id="body">
8
9 <table border="1" cellpadding="5" cellspacing="2" id="table">
10   <tbody>
11   <tr>
12     <th id="header1" scope="col" abbr="Name">Course Name</th>
13     <th id="header2" scope="col" abbr="Tutor">Course Tutor</th>
14     <th id="header3" scope="col">Summary</th>
15     <th id="header4" scope="col">Code</th>
16     <th id="header5" scope="col" colspan="2">Fee</th>
17   </tr>
18   <tr>
19     <td id="cell1" headers="header1 header3 header5">After the Civil War</td>
20     <td id="cell2" headers="header4 header3 header6">Dr. John Wroughton</td>
21     <td>October</td>
22     <td>H27</td>
23     <td>£32</td>
24     <td>£32</td>
25   </tr>
26 </tbody></table>
27
28
29 <p id="description"></p>
30 <div id="console"></div>
31
32 <script>
33
34     description("This tests that the headers attribute returns the correct headers for a table cell.");
35
36     if (window.accessibilityController) {
37
38         var table = accessibilityController.accessibleElementById("table");
39
40         // The first cell references header1 header3 header5.
41         var cell1 = table.cellForColumnAndRow(0, 1);
42         var colHeaders = cell1.columnHeaders();
43         shouldBe("colHeaders.length", "3");
44         shouldBeTrue("colHeaders[0].isEqual(table.cellForColumnAndRow(0, 0))");
45         shouldBeTrue("colHeaders[1].isEqual(table.cellForColumnAndRow(2, 0))");
46         shouldBeTrue("colHeaders[2].isEqual(table.cellForColumnAndRow(4, 0))");
47
48         // The second cell references header4 header3 and a non-existent header6.
49         var cell2 = table.cellForColumnAndRow(1, 1);
50         var colHeaders = cell2.columnHeaders();
51         shouldBe("colHeaders.length", "2");
52         shouldBeTrue("colHeaders[0].isEqual(table.cellForColumnAndRow(3, 0))");
53         shouldBeTrue("colHeaders[1].isEqual(table.cellForColumnAndRow(2, 0))");
54     }
55
56 </script>
57
58 <script src="../../resources/js-test-post.js"></script>
59 </body>
60 </html>