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

Unified Diff: third_party/WebKit/LayoutTests/accessibility/legend.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/legend.html
diff --git a/third_party/WebKit/LayoutTests/accessibility/legend.html b/third_party/WebKit/LayoutTests/accessibility/legend.html
index dc7b832dcd1444d9342ba837dd943225eb61f42d..d8de2c0e7a472ff089d4ec795cd05fd18a9a3541 100644
--- a/third_party/WebKit/LayoutTests/accessibility/legend.html
+++ b/third_party/WebKit/LayoutTests/accessibility/legend.html
@@ -6,9 +6,9 @@
</head>
<body id="body">
-<fieldset>
+<fieldset id="fieldset">
<legend>Choose a shipping method:</legend>
- <input id="overnight" type="radio" name="shipping" value="overnight" />Overnight
+ <div role="group"><input id="overnight" type="radio" name="shipping" value="overnight" />Overnight</div>
</fieldset>
<div>End of test</div>
@@ -21,14 +21,12 @@
description("This tests that a fieldset's title ui element is the legend.");
if (window.accessibilityController) {
- document.body.focus();
- var body = accessibilityController.focusedElement;
- var fieldset = body.childAtIndex(0);
+ var fieldset = accessibilityController.accessibleElementById("fieldset");
var titleUIElement = fieldset.nameElementAtIndex(0);
// Print out the tree of accessible objects, indicating the titleUIElement so
// that each platform can verify their expected object has been found
- buildAccessibilityTree(body, 0, 0, 0, titleUIElement, "<< fieldset's titleUIElement");
+ buildAccessibilityTree(accessibilityController.rootElement, 0, 0, 0, titleUIElement, "<< fieldset's titleUIElement");
// Verify that we have gotten the titleUIElement and it has the expected text,
// which should be in the last descendant regardless of platform.

Powered by Google App Engine
This is Rietveld 408576698