Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / accessibility / inline-text-input.html
blob51b4de7862ec91d829bf5af0e25fe59c1241a345
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../resources/js-test.js"></script>
5 </head>
6 <body>
8 <input type="text" id="input" value="Value">
10 <p id="description"></p>
12 <div id="console"></div>
14 <script>
16 description("Demonstrates that accessible inline text boxes can be found within an input type=text.");
18 if (window.accessibilityController) {
20 function findAllDescendantsWithRole(axObject, role) {
21 if (axObject.role == role)
22 return [axObject];
23 var result = [];
24 for (var i = 0; i < axObject.childrenCount; i++)
25 result = result.concat(findAllDescendantsWithRole(axObject.childAtIndex(i), role));
26 return result;
29 var axInput = accessibilityController.accessibleElementById('input');
30 var axDiv = axInput.childAtIndex(0);
31 var axStaticText = axDiv.childAtIndex(0);
32 var axInlineTextBox = axStaticText.childAtIndex(0);
33 shouldBe("axInlineTextBox.role", "'AXRole: AXInlineTextBox'");
34 shouldBe("axInlineTextBox.stringValue", "'AXValue: Value'");
36 </script>
38 </body>
39 </html>