Fix keypad issue when ime context transit to another context
[framework/web/webkit-efl.git] / LayoutTests / accessibility / image-link-inline-cont.html
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>
10
11 <h2>Image link in the presence of inline continuations</h2>
12
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>
18
19   <div id="plain">
20     <a href="http://www.wowhead.com/?item=33924"><img alt="Delicious cake" src="resources/cake.png"></a>
21   </div>
22
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>
26
27 <pre id="result"></div>
28
29 <script>
30 function axTree(elt)
31 {
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));
36     }
37     return result;
38 }
39
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, "");
45
46     document.getElementById("with-div").focus();
47     var withDivResult = axTree(accessibilityController.focusedElement);
48     withDivResult.replace(/AXSize.*\n/g, "");
49
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;
54     }
55 }
56 </script>
57 </body>