Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / image-link.html
blobee9dfb29eabf1b1e1074f0c4f49508959d5340a2
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>
11 <h2>Image link in the presence of inline continuations</h2>
13 <p>This test checks that the right accessibility tree is generated for a link inside an image</p>
15 <a id="test" href="http://www.wowhead.com/?item=33924"><img alt="Delicious cake" src="resources/cake.png"></a>
17 <div id="result"></div>
19 <script>
20 function axTree(elt)
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));
27 return result;
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);
37 </script>
38 </body>