| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <script> | |
| 3 if (window.testRunner) | |
| 4 testRunner.dumpAsText(); | |
| 5 | |
| 6 // The Mac port exposes static text objects as an accessible child of an ele
ment with text. | |
| 7 // The Atk port folds static text objects into the parent element. | |
| 8 function getTextChild(accessibilityObject) { | |
| 9 if (accessibilityObject.childrenCount) | |
| 10 return accessibilityObject.childAtIndex(0); | |
| 11 | |
| 12 return accessibilityObject; | |
| 13 } | |
| 14 </script> | |
| 15 <head> | |
| 16 <meta http-equiv="content-language" content="en-gb"> | |
| 17 <body id="body"> | |
| 18 | |
| 19 <!-- This tests the ability to get the content language for various elements
using various techniques --> | |
| 20 | |
| 21 cheerio | |
| 22 | |
| 23 <p lang="de">germannish</p> | |
| 24 <p lang="ja">elvish</p> | |
| 25 | |
| 26 and more english | |
| 27 | |
| 28 <div id="result"></div> | |
| 29 | |
| 30 <script> | |
| 31 if (window.accessibilityController) { | |
| 32 var body = document.getElementById("body"); | |
| 33 body.focus(); | |
| 34 var webArea = accessibilityController.focusedElement; | |
| 35 var result = document.getElementById("result"); | |
| 36 | |
| 37 var text1 = getTextChild(webArea.childAtIndex(0)); | |
| 38 var text2 = getTextChild(webArea.childAtIndex(1)); | |
| 39 var text3 = getTextChild(webArea.childAtIndex(2)); | |
| 40 var text4 = getTextChild(webArea.childAtIndex(3)); | |
| 41 | |
| 42 if ( webArea.language == "AXLanguage: en-gb" && text1.language == "A
XLanguage: en-gb" && | |
| 43 text2.language == "AXLanguage: de" && text3.language == "AXLang
uage: ja" && | |
| 44 text4.language == "AXLanguage: en-gb") { | |
| 45 result.innerText = "Passed"; | |
| 46 } | |
| 47 else { | |
| 48 result.innerText = "Failed. Could not find AXLanguages: " + webAr
ea.language + " - " + text1.language; | |
| 49 } | |
| 50 } | |
| 51 </script> | |
| 52 </body> | |
| 53 </html> | |
| OLD | NEW |