Bug 24474: AX: in multi-body tables, asking for a cell at a specific coordinate can...
[WebKit-https.git] / LayoutTests / platform / mac-snowleopard / accessibility / table-multi-bodies.html
1 <html>
2     
3     <head>
4         <script>
5             if (window.layoutTestController)
6             layoutTestController.dumpAsText();
7             </script>
8     </head>
9     
10     <body id="body">
11         
12         <table class="tborder" cellpadding="6" cellspacing="1" border="1" width="100%" align="center">
13             <thead>
14                 <tr align="center">
15                     <td class="thead">&nbsp;</td>
16                     <td class="thead" width="100%" align="left">Forum</td>
17                     <td class="thead">Last Post</td>
18                     <td class="thead">Threads</td>
19                     <td class="thead">Posts</td>
20                 </tr>
21             </thead>
22             <tbody>
23                 <tr>
24                     <td class="tcat" colspan="5"><a style="float:right" href="#top" ><img id="collapseimg_forumbit_71" alt="" border="0" /></a>
25                         <a href="forumdisplay.php?f=71">English Forums</a>
26                     </td>
27                 </tr>
28             </tbody>
29             <tbody id="collapseobj_forumbit_71" style="">
30                 <tr>
31                     <td class="tcat"><span class="smallfont">&nbsp;</span></td>
32                     <td class="tcat" colspan="4">
33                         <a href="forumdisplay.php?f=30">Main Discussion</a>
34                     </td>
35                 </tr>
36                 <tr align="center">
37                     <td class="alt2"><img  alt="" border="0" id="forum_statusicon_23" /></td>
38                     <td class="alt1Active" align="left" id="f23">
39                         Want to communicate with other local fans? Do it here, too!
40                     </td>
41                     <td class="alt2" nowrap="nowrap">
42                         Today <span class="time">03:52pm</span>
43                     </td>
44                     <td class="alt1">381</td>
45 <td class="alt2">23,437</td>
46 </tr>
47 </table>
48 <BR><BR><BR>
49 <div id="result">
50 </div>
51
52 <script>
53         if (window.accessibilityController) {
54
55             var body = document.getElementById("body");
56             body.focus();
57             var table = accessibilityController.focusedElement.childAtIndex(0);
58             
59             result.innerText += "------------------------\n";
60             var axCellKey = "AXCell";
61          
62             var tableCell1 = table.cellForColumnAndRow(2,0);
63             if (tableCell1.allAttributes().indexOf(axCellKey) != -1) {
64                 result.innerText += "Pass";
65             } 
66             else {
67                 result.innerText += "Fail";
68             }
69         }
70 </script>
71
72 </body>
73 </html>