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

Unified Diff: third_party/WebKit/LayoutTests/accessibility/radio-button-title-label.html

Issue 1417213006: Switch all LayoutTests to use new AX name calculation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix canvas-fallback-content-labels-expected.txt Created 5 years, 1 month 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/radio-button-title-label.html
diff --git a/third_party/WebKit/LayoutTests/accessibility/radio-button-title-label.html b/third_party/WebKit/LayoutTests/accessibility/radio-button-title-label.html
index a01582f692c0cbdca01fa98d18cc3df2134a4a25..f4de4d1757b21c9af42156ec920e43456f99301a 100644
--- a/third_party/WebKit/LayoutTests/accessibility/radio-button-title-label.html
+++ b/third_party/WebKit/LayoutTests/accessibility/radio-button-title-label.html
@@ -10,7 +10,7 @@
<p id="description"></p>
<div id="console"></div>
-
+
<input type="radio" name="r1" id="r1" title="TITLE">Test<br>
<label for="r1">LABEL</label>
@@ -32,25 +32,25 @@
// 1) Even though a checkbox has a title attribute, the title ui element should still be exposed.
var focusedElement = accessibilityController.focusedElement;
- var titleUIElement = focusedElement.deprecatedTitleUIElement();
- shouldBe("focusedElement.deprecatedTitle", "'AXTitle: LABEL'");
- shouldBeTrue("!titleUIElement || titleUIElement.deprecatedTitle == 'AXTitle: '");
+ var titleUIElement = focusedElement.nameElementAtIndex(0);
+ shouldBe("focusedElement.name", "'LABEL'");
+ shouldBeTrue("!titleUIElement || titleUIElement.name == ''");
// 2) aria-labeledby should override the native label semantics and return a title for the radio button, instead of a title ui element.
document.getElementById("r2").focus();
focusedElement = accessibilityController.focusedElement;
- titleUIElement = focusedElement.deprecatedTitleUIElement();
- shouldBe("focusedElement.deprecatedDescription", "'AXDescription: LABEL2a'");
- shouldBe("focusedElement.deprecatedTitle", "'AXTitle: '");
- shouldBeTrue("!titleUIElement || titleUIElement.deprecatedTitle == 'AXTitle: '");
+ titleUIElement = focusedElement.nameElementAtIndex(0);
+ shouldBe("focusedElement.name", "'LABEL2a'");
+ shouldBe("focusedElement.description", "''");
+ shouldBeTrue("!titleUIElement || titleUIElement.name == ''");
// 3) If a radio button has an aria-label and a <label>, the aria-label should be the title.
document.getElementById("r3").focus();
focusedElement = accessibilityController.focusedElement;
- titleUIElement = focusedElement.deprecatedTitleUIElement();
- shouldBe("focusedElement.deprecatedDescription", "'AXDescription: radio3'");
- shouldBe("focusedElement.deprecatedTitle", "'AXTitle: '");
- shouldBeTrue("!titleUIElement || titleUIElement.deprecatedTitle == 'AXTitle: '");
+ titleUIElement = focusedElement.nameElementAtIndex(0);
+ shouldBe("focusedElement.name", "'radio3'");
+ shouldBe("focusedElement.description", "''");
+ shouldBeTrue("!titleUIElement || titleUIElement.name == ''");
}
</script>

Powered by Google App Engine
This is Rietveld 408576698