Merge "[Release] Webkit2-efl-123997_0.11.51" into tizen_2.1
[framework/web/webkit-efl.git] / LayoutTests / accessibility / table-cell-spans.html
1 <html>
2 <script>
3     if (window.testRunner)
4         testRunner.dumpAsText();
5 </script>
6 <body id="body">
7     
8     <!-- Test image map -->
9     <table id="testTable" align="center" border="1" cellpadding="5" cellspacing="0">
10         <tr>
11             <td class="center" colspan="2" rowspan="2" width="50%">Cell A<br>
12                 COLSPAN="2"<br> ROWSPAN="2"</td>
13             
14             <td class="center" colspan="2">Cell B<br> COLSPAN="2"</td>
15             </tr>
16         <tr>
17             <td class="center">2,3</td>
18             <td class="center">2,4</td>
19             </tr>
20         
21         <tr class="center">
22             <td class="center" rowspan="2">Cell C<br> ROWSPAN="2"</td>
23             <td class="center" width="25%">3,2</td>
24             <td class="center">3,3</td>
25             <td class="center">3,4</td>
26             </tr>
27         
28         <tr>
29             <td class="center">4,2</td>
30             <td class="center">4,3</td>
31             <td class="center">4,4</td>
32             </tr>
33     </table>
34
35     <div id="result"></div>
36     
37     
38     <script>
39         if (window.accessibilityController) {
40             var result = document.getElementById("result");
41
42             var body = document.getElementById("body");
43             body.focus();
44             var table = accessibilityController.focusedElement.childAtIndex(0);
45
46             var cell = table.cellForColumnAndRow(0,0); 
47             result.innerText += "----------------------\n";
48             result.innerText += "{ 0, 0 }\n";
49             result.innerText += cell.allAttributes() + "\n";
50             result.innerText += cell.rowIndexRange() + ", " + cell.columnIndexRange()  + "\n\n"; 
51
52             var cell = table.cellForColumnAndRow(1,1); 
53             result.innerText += "----------------------\n";
54             result.innerText += "{ 1, 1 }\n";
55             result.innerText += cell.allAttributes() + "\n";
56             result.innerText += cell.rowIndexRange() + ", " + cell.columnIndexRange()  + "\n\n"; 
57
58             var cell = table.cellForColumnAndRow(0,3); 
59             result.innerText += "----------------------\n";
60             result.innerText += "{ 3, 0 }\n";
61             result.innerText += cell.allAttributes() + "\n";
62             result.innerText += cell.rowIndexRange() + ", " + cell.columnIndexRange()  + "\n\n"; 
63
64             cell = table.cellForColumnAndRow(0,2); 
65             result.innerText += "----------------------\n";
66             result.innerText += "{ 2, 0 }\n";
67             result.innerText += cell.allAttributes() + "\n";
68             result.innerText += cell.rowIndexRange() + ", " + cell.columnIndexRange()  + "\n\n"; 
69
70             cell = table.cellForColumnAndRow(3,2); 
71             result.innerText += "----------------------\n";
72             result.innerText += "{ 2, 3 }\n";
73             result.innerText += cell.allAttributes() + "\n";
74             result.innerText += cell.rowIndexRange() + ", " + cell.columnIndexRange()  + "\n\n"; 
75
76             cell = table.cellForColumnAndRow(10,10); 
77             result.innerText += "----------------------\n";
78             result.innerText += "{ 10, 10 }\n";
79             result.innerText += (cell != null ? cell.allAttributes() : "") + "\n";
80             result.innerText += cell != null ? cell.rowIndexRange() : "{0, 0}";
81             result.innerText += ", " + (cell != null ? cell.columnIndexRange() : "{0, 0}") + "\n\n";
82         }
83     </script>
84 </body>
85 </html>