OLD | NEW |
1 <html> | 1 <html> |
2 <script> | 2 <script> |
3 if (window.testRunner) | 3 if (window.testRunner) |
4 testRunner.dumpAsText(); | 4 testRunner.dumpAsText(); |
5 </script> | 5 </script> |
6 <body id="body"> | 6 <body id="body"> |
7 | 7 |
8 <!-- This test makes sure that spacer elements are not returned as elements.
There should be at most 4 elements returned --> | 8 <!-- This test makes sure that spacer elements are not returned as elements.
There should be at most 4 elements returned --> |
9 | 9 |
| 10 <div role="group" id="container"> |
10 <b>First</b> | 11 <b>First</b> |
11 <b>Second</b> | 12 <b>Second</b> |
12 <a href="http://www.apple.com">Apple</a> | 13 <a href="http://www.apple.com">Apple</a> |
13 <a href="http://www.yahoo.com">Yahoo</a> | 14 <a href="http://www.yahoo.com">Yahoo</a> |
| 15 </div> |
14 | 16 |
15 | 17 |
16 <div id="result"></div> | 18 <div id="result"></div> |
17 | 19 |
18 | 20 |
19 <script> | 21 <script> |
20 if (window.accessibilityController) { | 22 if (window.accessibilityController) { |
21 var result = document.getElementById("result"); | 23 var result = document.getElementById("result"); |
22 | 24 |
23 var body = document.getElementById("body"); | 25 var body = document.getElementById("body"); |
24 body.focus(); | 26 body.focus(); |
25 var container = accessibilityController.focusedElement.childAtIndex(
0); | 27 var container = accessibilityController.accessibleElementById("conta
iner"); |
26 | 28 |
27 // The Gtk port ATs expect the bold inline text to not have accessib
le objects. | 29 if (container.childrenCount == 4) { |
28 var expectedCount = (testRunner.platformName == "gtk") ? 2 : 4; | |
29 if (container.childrenCount == expectedCount) { | |
30 result.innerText += "Test passed\n"; | 30 result.innerText += "Test passed\n"; |
31 } | 31 } |
32 else { | 32 else { |
33 result.innerText += "Test failed\n"; | 33 result.innerText += "Test failed\n"; |
34 } | 34 } |
35 } | 35 } |
36 </script> | 36 </script> |
37 </body> | 37 </body> |
38 </html> | 38 </html> |
OLD | NEW |