OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script> | 4 <script> |
5 | 5 |
6 function buildAccessibilityTree(accessibilityObject, indent) { | 6 function buildAccessibilityTree(accessibilityObject, indent) { |
7 var str = ""; | 7 var str = ""; |
8 for (var i = 0; i < indent; i++) | 8 for (var i = 0; i < indent; i++) |
9 str += " "; | 9 str += " "; |
10 str += accessibilityObject.role; | 10 str += accessibilityObject.role; |
11 str += " " + accessibilityObject.stringValue; | 11 str += " " + accessibilityObject.stringValue; |
12 str += "\n"; | 12 str += "\n"; |
13 document.getElementById("tree").innerText += str; | 13 document.getElementById("tree").innerText += str; |
14 | 14 |
15 if (accessibilityObject.stringValue.indexOf('End of test') >= 0) | 15 if (accessibilityObject.stringValue.indexOf('End of test') >= 0) |
16 return false; | 16 return false; |
17 | 17 |
18 var count = accessibilityObject.childrenCount; | 18 var count = accessibilityObject.childrenCount; |
19 for (var i = 0; i < count; ++i) { | 19 for (var i = 0; i < count; ++i) { |
20 if (!buildAccessibilityTree(accessibilityObject.childAtIndex(i), ind
ent + 1)) | 20 if (!buildAccessibilityTree(accessibilityObject.childAtIndex(i), ind
ent + 1)) |
21 return false; | 21 return false; |
22 } | 22 } |
23 | 23 |
24 return true; | 24 return true; |
25 } | 25 } |
26 </script> | 26 </script> |
27 <script src="../fast/js/resources/js-test-pre.js"></script> | 27 <script src="../resources/js-test.js"></script> |
28 </head> | 28 </head> |
29 <body> | 29 <body> |
30 | 30 |
31 <a><div></div></a> | 31 <a><div></div></a> |
32 | 32 |
33 <a><div></div></a> | 33 <a><div></div></a> |
34 | 34 |
35 <a href="about:blank"><div></div></a> | 35 <a href="about:blank"><div></div></a> |
36 | 36 |
37 <div>End of test</div> | 37 <div>End of test</div> |
(...skipping 18 matching lines...) Expand all Loading... |
56 // Build up full accessibility tree again. | 56 // Build up full accessibility tree again. |
57 document.getElementById("tree").innerText += "After:\n"; | 57 document.getElementById("tree").innerText += "After:\n"; |
58 document.body.focus(); | 58 document.body.focus(); |
59 buildAccessibilityTree(accessibilityController.focusedElement, 0); | 59 buildAccessibilityTree(accessibilityController.focusedElement, 0); |
60 } | 60 } |
61 | 61 |
62 </script> | 62 </script> |
63 | 63 |
64 </body> | 64 </body> |
65 </html> | 65 </html> |
OLD | NEW |