Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / accessibility / table-with-footer-section-above-body.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <div id="content">
9 <table id="table1" cellspacing="0" role="grid">
10     <thead>
11         <tr role="row"><th>Name</th><th>Position</th><th>Office</th><th>Age</th><th>Start date</th><th>Salary</th></tr>
12     </thead>
13
14     <tfoot>
15         <tr role="row"><th>Name</th><th>Position</th><th>Office</th><th>Age</th><th>Start date</th><th>Salary</th></tr>
16     </tfoot>
17
18     <tbody>
19         <tr><td>a</td><td>b</td><td>c</td><td>d</td></tr>
20     </tbody>
21 </table>
22
23 <table id="table2" cellspacing="0">
24     <thead>
25         <tr><th>Name</th><th>Position</th><th>Office</th><th>Age</th><th>Start date</th><th>Salary</th></tr>
26     </thead>
27
28     <tfoot>
29         <tr><th>Name</th><th>Position</th><th>Office</th><th>Age</th><th>Start date</th><th>Salary</th></tr>
30     </tfoot>
31
32     <tbody>
33         <tr><td>a</td><td>b</td><td>c</td><td>d</td></tr>
34     </tbody>
35 </table>
36
37 </div>
38
39 <p id="description"></p>
40 <div id="console"></div>
41
42 <script>
43
44     description("This tests that the row span information for the cells in the body is not offset by the footer section, even though the footer section is above the body in the DOM. This tests tables that have a role=grid and without.");
45
46     if (window.accessibilityController) {
47      
48         var table = accessibilityController.accessibleElementById("table1");
49         var testCell = table.cellForColumnAndRow(0, 1);
50         if (accessibilityController.platformName != "atk")
51             debug("Table1 cell content at {0, 1}: " + testCell.childAtIndex(0).stringValue);
52         else
53             debug("Table1 cell content at {0, 1}: " + testCell.stringValue);
54         debug("Table1 cell range at {0, 1}: " + testCell.rowIndexRange());
55
56         testCell = table.cellForColumnAndRow(0, 2);
57         if (accessibilityController.platformName != "atk")
58             debug("Table1 cell content at {0, 2}: " + testCell.childAtIndex(0).stringValue);
59         else
60             debug("Table1 cell content at {0, 2}: " + testCell.stringValue);
61         debug("Table1 cell range at {0, 2}: " + testCell.rowIndexRange());
62
63         table = accessibilityController.accessibleElementById("table2");
64         testCell = table.cellForColumnAndRow(0, 1);
65         if (accessibilityController.platformName != "atk")
66             debug("Table2 cell content at {0, 1}: " + testCell.childAtIndex(0).stringValue);
67         else
68             debug("Table2 cell content at {0, 1}: " + testCell.stringValue);
69         debug("Table2 cell range at {0, 1}: " + testCell.rowIndexRange());
70
71         testCell = table.cellForColumnAndRow(0, 2);
72         if (accessibilityController.platformName != "atk")
73             debug("Table2 cell content at {0, 2}: " + testCell.childAtIndex(0).stringValue);
74         else
75             debug("Table2 cell content at {0, 2}: " + testCell.stringValue);
76         debug("Table2 cell range at {0, 2}: " + testCell.rowIndexRange());
77
78         document.getElementById("content").style.visibility = "hidden";
79     }
80
81 </script>
82
83 <script src="../resources/js-test-post.js"></script>
84 </body>
85 </html>