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

Unified Diff: chrome/renderer/extensions/automation_internal_custom_bindings.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: chrome/renderer/extensions/automation_internal_custom_bindings.cc
diff --git a/chrome/renderer/extensions/automation_internal_custom_bindings.cc b/chrome/renderer/extensions/automation_internal_custom_bindings.cc
index 89a19c6ad1a9dfdf49704029ccbc007b7d4b76c6..54f7367757e1e85b57d7052c7d16f89eec1ce934 100644
--- a/chrome/renderer/extensions/automation_internal_custom_bindings.cc
+++ b/chrome/renderer/extensions/automation_internal_custom_bindings.cc
@@ -742,16 +742,26 @@ AutomationInternalCustomBindings::AutomationInternalCustomBindings(
std::string name_from_str = ui::ToString(name_from);
result.Set(v8::String::NewFromUtf8(isolate, name_from_str.c_str()));
});
- RouteNodeIDFunction("GetChecked", [](v8::Isolate* isolate,
- v8::ReturnValue<v8::Value> result,
- TreeCache* cache, ui::AXNode* node) {
- const ui::AXCheckedState checked_state = static_cast<ui::AXCheckedState>(
- node->data().GetIntAttribute(ui::AX_ATTR_CHECKED_STATE));
- if (checked_state) {
- const std::string checked_str = ui::ToString(checked_state);
- result.Set(v8::String::NewFromUtf8(isolate, checked_str.c_str()));
- }
- });
+ RouteNodeIDFunction(
+ "GetChecked", [](v8::Isolate* isolate, v8::ReturnValue<v8::Value> result,
+ TreeCache* cache, ui::AXNode* node) {
+ const ui::AXButtonState checked_state = static_cast<ui::AXButtonState>(
+ node->data().GetIntAttribute(ui::AX_ATTR_CHECKED_STATE));
+ if (checked_state) {
+ const std::string checked_str = ui::ToString(checked_state);
+ result.Set(v8::String::NewFromUtf8(isolate, checked_str.c_str()));
+ }
+ });
+ RouteNodeIDFunction(
+ "GePressed", [](v8::Isolate* isolate, v8::ReturnValue<v8::Value> result,
+ TreeCache* cache, ui::AXNode* node) {
+ const ui::AXButtonState pressed_state = static_cast<ui::AXButtonState>(
+ node->data().GetIntAttribute(ui::AX_ATTR_PRESSED_STATE));
+ if (pressed_state) {
+ const std::string pressed_str = ui::ToString(pressed_state);
+ result.Set(v8::String::NewFromUtf8(isolate, pressed_str.c_str()));
+ }
+ });
}
AutomationInternalCustomBindings::~AutomationInternalCustomBindings() {}
« no previous file with comments | « chrome/common/extensions/api/automation.idl ('k') | chrome/renderer/resources/extensions/automation/automation_node.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698