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

Unified Diff: content/shell/test_runner/web_ax_object_proxy.cc

Issue 2707263011: Test aria-pressed=mixed on windows (Closed)
Patch Set: git cl try Created 3 years, 7 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: content/shell/test_runner/web_ax_object_proxy.cc
diff --git a/content/shell/test_runner/web_ax_object_proxy.cc b/content/shell/test_runner/web_ax_object_proxy.cc
index 79e403c17241ab7053d892d2a2f24b09e275ffe8..2a9bf923ed588a62819188fa7fdb79f054485868 100644
--- a/content/shell/test_runner/web_ax_object_proxy.cc
+++ b/content/shell/test_runner/web_ax_object_proxy.cc
@@ -605,7 +605,8 @@ gin::ObjectTemplateBuilder WebAXObjectProxy::GetObjectTemplateBuilder(
.SetProperty("isSelectedOptionActive",
&WebAXObjectProxy::IsSelectedOptionActive)
.SetProperty("isExpanded", &WebAXObjectProxy::IsExpanded)
- .SetProperty("isChecked", &WebAXObjectProxy::IsChecked)
+ .SetProperty("checkedState", &WebAXObjectProxy::CheckedState)
+ .SetProperty("pressedState", &WebAXObjectProxy::PressedState)
.SetProperty("isVisible", &WebAXObjectProxy::IsVisible)
.SetProperty("isOffScreen", &WebAXObjectProxy::IsOffScreen)
.SetProperty("isCollapsed", &WebAXObjectProxy::IsCollapsed)
@@ -636,7 +637,6 @@ gin::ObjectTemplateBuilder WebAXObjectProxy::GetObjectTemplateBuilder(
.SetProperty("columnCount", &WebAXObjectProxy::ColumnCount)
.SetProperty("columnHeadersCount", &WebAXObjectProxy::ColumnHeadersCount)
.SetProperty("isClickable", &WebAXObjectProxy::IsClickable)
- .SetProperty("isButtonStateMixed", &WebAXObjectProxy::IsButtonStateMixed)
//
// NEW bounding rect calculation - high-level interface
//
@@ -1037,9 +1037,28 @@ bool WebAXObjectProxy::IsExpanded() {
return accessibility_object_.IsExpanded() == blink::kWebAXExpandedExpanded;
}
-bool WebAXObjectProxy::IsChecked() {
+std::string WebAXObjectProxy::CheckedState() {
accessibility_object_.UpdateLayoutAndCheckValidity();
- return accessibility_object_.CheckedState() != blink::WebAXCheckedFalse;
+ switch (accessibility_object_.CheckedState()) {
+ case blink::WebAXButtonStateOn:
+ return "true";
+ case blink::WebAXButtonStateMixed:
+ return "mixed";
+ default:
+ return "false";
+ }
+}
+
+std::string WebAXObjectProxy::PressedState() {
+ accessibility_object_.UpdateLayoutAndCheckValidity();
+ switch (accessibility_object_.PressedState()) {
+ case blink::WebAXButtonStateOn:
+ return "true";
+ case blink::WebAXButtonStateMixed:
+ return "mixed";
+ default:
+ return "false";
+ }
}
bool WebAXObjectProxy::IsCollapsed() {
@@ -1255,11 +1274,6 @@ bool WebAXObjectProxy::IsClickable() {
return accessibility_object_.IsClickable();
}
-bool WebAXObjectProxy::IsButtonStateMixed() {
- accessibility_object_.UpdateLayoutAndCheckValidity();
- return accessibility_object_.CheckedState() == blink::WebAXCheckedMixed;
-}
-
v8::Local<v8::Object> WebAXObjectProxy::AriaControlsElementAtIndex(
unsigned index) {
accessibility_object_.UpdateLayoutAndCheckValidity();
« no previous file with comments | « content/shell/test_runner/web_ax_object_proxy.h ('k') | content/test/data/accessibility/aria/aria-pressed.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698