Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / image-link-inline-cont.html
blobd517afe6127fcf942efce0686cb98b3680da3b3c
1 <!DOCTYPE html>
2 <head>
3 <title>Image link in the presence of inline continuations</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 a block inside a link does not unduly disturb
14 the render tree via inline continuations. In particular, it checks
15 that adding &lt;div role=presentation> between a link and its
16 contained image does not alter the accessibility tree at all, other
17 than with respect to size.</p>
19 <div id="plain">
20 <a href="http://www.wowhead.com/?item=33924"><img alt="Delicious cake" src="resources/cake.png"></a>
21 </div>
23 <div id="with-div">
24 <a href="http://www.wowhead.com/?item=33924"><div role="presentation"><img alt="Delicious cake" src="resources/cake.png"></div></a>
25 </div>
27 <pre id="result"></div>
29 <script>
30 function axTree(elt)
32 var result = elt.allAttributes() + "\n\n";
33 var count = elt.childrenCount;
34 for (var i = 0; i < count; ++i) {
35 result += "Child " + i + ":\n" + axTree(elt.childAtIndex(i));
37 return result;
40 if (window.accessibilityController) {
41 var result = document.getElementById("result");
42 document.getElementById("plain").focus();
43 var plainResult = axTree(accessibilityController.focusedElement);
44 plainResult.replace(/AXSize.*\n/g, "");
46 document.getElementById("with-div").focus();
47 var withDivResult = axTree(accessibilityController.focusedElement);
48 withDivResult.replace(/AXSize.*\n/g, "");
50 if (plainResult == withDivResult) {
51 result.innerHTML = "PASS: accessibility trees were identical other than size."
52 } else {
53 result.innerHTML = "FAIL: accessibility trees differ.\nPlain image link: \n" + plainResult + "\nWith presentation div:\n" + withDivResult;
56 </script>
57 </body>