Index: third_party/WebKit/LayoutTests/accessibility/nochildren-elements.html |
diff --git a/third_party/WebKit/LayoutTests/accessibility/nochildren-elements.html b/third_party/WebKit/LayoutTests/accessibility/nochildren-elements.html |
index 7d4c6284d3ab06d316286f6ff0fdb42affe224f4..e64459a1fd30f32840c130a32f2e743e9b47965a 100644 |
--- a/third_party/WebKit/LayoutTests/accessibility/nochildren-elements.html |
+++ b/third_party/WebKit/LayoutTests/accessibility/nochildren-elements.html |
@@ -9,8 +9,8 @@ |
<!-- This test makes sure that these types of elements DO NOT have children. |
The test will pass if attributesOfChildren() returns nil --> |
- <input type="file"> |
- <div role="button"><b><i>inside</i></b></div> |
+ <input id="file" type="file"> |
+ <div id="button" role="button"><b><i>inside</i></b></div> |
<div id="result"></div> |
@@ -19,16 +19,9 @@ |
if (window.accessibilityController) { |
var result = document.getElementById("result"); |
- // radio button 1 |
- var body = document.getElementById("body"); |
- body.focus(); |
- var focusedElement = accessibilityController.focusedElement; |
+ var element1 = accessibilityController.accessibleElementById("file"); |
- // this input=file is inside of a group, so we need to go two levels |
- var element1 = focusedElement.childAtIndex(0); |
- element1 = element1.childAtIndex(0); |
- |
- var element2 = focusedElement.childAtIndex(1); |
+ var element2 = accessibilityController.accessibleElementById("button"); |
var element1Children = element1.attributesOfChildren(); |
var element2Children = element2.attributesOfChildren(); |