| <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
| <html> |
| <head> |
| <script src="../../resources/js-test-pre.js"></script> |
| </head> |
| <body id="body" onload="startTest();"> |
| <form> |
| <label for="foo">Full Name:</label> |
| <input type="text" id="foo" /> |
| </form> |
| <p id="description"></p> |
| <div id="console"></div> |
| <script> |
| var webArea; |
| var form; |
| |
| function checkResults() { |
| // Actually check the results |
| entry = form.childAtIndex(1); |
| shouldBe("entry.role", "'AXRole: AXTextField'"); |
| shouldBe("entry.title", "'AXTitle: Full Name:'"); |
| finishJSTest(); |
| } |
| |
| function startTest() { |
| description("This tests that accessibility objects derive their names from associated labels."); |
| |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| } |
| |
| document.getElementById("body").focus(); |
| webArea = accessibilityController.focusedElement; |
| form = webArea.childAtIndex(0); |
| |
| // Check results on idle to ensure layout() is done |
| window.setTimeout("checkResults()", 0); |
| } |
| |
| window.jsTestIsAsync = true; |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |