Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: third_party/WebKit/LayoutTests/accessibility/nochildren-elements.html

Issue 2382083002: Make LayoutTests ambivalent of of anonymous blocks (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698