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

Unified Diff: third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-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/aria-labelledby-overrides-label.html
diff --git a/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-label.html b/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-label.html
index 5427ae5af88f81222075eedb0f7c54ce2b72b094..0d61a73aab6b1c8f362eb64708a840d7249b7845 100644
--- a/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-label.html
+++ b/third_party/WebKit/LayoutTests/accessibility/aria-labelledby-overrides-label.html
@@ -5,9 +5,13 @@
</head>
<body id="body">
-<span id="labelShutdown"><label id="labelElement" for="shutdownTime">Shut down computer after</label></span>
-<input id="shutdownTime" type="text" value="10" aria-labelledby="labelShutdown shutdownTime shutdownUnit" />
-<span id="shutdownUnit">minutes</span>
+<label for="target">Label</label>
+
+<div id="a">A</div>
+<div id="b">B</div>
+<div id="c">C</div>
+
+<input id="target" aria-labelledby="a b c" value="10">
<p id="description"></p>
<div id="console"></div>
@@ -17,20 +21,9 @@
description("This tests that if aria-labelledby is used, then label elements are not used");
if (window.accessibilityController) {
-
- var text = document.getElementById("shutdownTime");
- text.focus();
- text = accessibilityController.focusedElement;
-
- shouldBe("text.deprecatedDescription", "'AXDescription: Shut down computer after 10 minutes'");
-
- // There should be no title UI element.
- shouldBe("text.deprecatedTitleUIElement() != null && text.deprecatedTitleUIElement().isValid", "false");
-
- var labelElement = accessibilityController.accessibleElementById("labelElement");
- // This just makes sure that the label element is still visible in the AX hierarchy, even though
- // it's a label element (sometimes they are ignored).
- debug("Label element role is: " + labelElement.role);
+ var axTarget = accessibilityController.accessibleElementById("target");
+ shouldBe("axTarget.name", "'A B C'");
+ shouldBe("axTarget.nameElementCount()", "3");
}
</script>

Powered by Google App Engine
This is Rietveld 408576698