Merge "[Release] Webkit2-efl-123997_0.11.51" into tizen_2.1
[framework/web/webkit-efl.git] / LayoutTests / accessibility / image-link.html
1 <!DOCTYPE html>
2 <head>
3 <title>Image link test</title>
4 <script>
5 if (window.testRunner)
6     testRunner.dumpAsText();
7 </script>
8 </head>
9 <body>
10
11 <h2>Image link in the presence of inline continuations</h2>
12
13 <p>This test checks that the right accessibility tree is generated for a link inside an image</p>
14
15   <a id="test" href="http://www.wowhead.com/?item=33924"><img alt="Delicious cake" src="resources/cake.png"></a>
16
17   <div id="result"></div>
18
19 <script>
20 function axTree(elt)
21 {
22     var result = elt.allAttributes() + "\n\n";
23     var count = elt.childrenCount;
24     for (var i = 0; i < count; ++i) {
25         result += "Child " + i + ":\n" + axTree(elt.childAtIndex(i));
26     }
27     return result;
28 }
29
30 window.onload = function () {
31     if (window.accessibilityController) {
32         var result = document.getElementById("result");
33         document.getElementById("test").focus();
34         result.innerText += axTree(accessibilityController.focusedElement);
35     }
36 }
37 </script>
38 </body>