Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / accessibility / nochildren-elements.html
blob6eec5eceebfdf46515496307223094993565c590
1 <html>
2 <script>
3 if (window.layoutTestController)
4 layoutTestController.dumpAsText();
5 </script>
6 <body id='body'>
9 <!-- This test makes sure that these types of elements DO NOT have children.
10 The test will pass if attributesOfChildren() returns nil -->
12 <input type="file">
13 <div role="button"><b><i>inside</i></b></div>
15 <div id="result"></div>
18 <script>
19 if (window.accessibilityController) {
20 var result = document.getElementById("result");
22 // radio button 1
23 var body = document.getElementById("body");
24 body.focus();
25 var focusedElement = accessibilityController.focusedElement;
27 // this input=file is inside of a group, so we need to go two levels
28 var element1 = focusedElement.childAtIndex(0);
29 element1 = element1.childAtIndex(0);
31 var element2 = focusedElement.childAtIndex(1);
33 var element1Children = element1.attributesOfChildren();
34 var element2Children = element2.attributesOfChildren();
36 if (element1Children != "" || element2Children != "") {
37 result.innerText += "FAIL\n" + element1Children + "\n" + element2Children;
39 else {
40 result.innerText += "PASS";
43 </script>
44 </body>
45 </html>