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

Unified Diff: ash/common/system/user/tray_user_unittest.cc

Issue 2477463003: Replace ui::AXViewState with AXNodeData and AXActionData (Closed)
Patch Set: Fix test Created 4 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
« no previous file with comments | « ash/common/system/user/button_from_view.cc ('k') | ash/common/system/user/user_card_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/user/tray_user_unittest.cc
diff --git a/ash/common/system/user/tray_user_unittest.cc b/ash/common/system/user/tray_user_unittest.cc
index 0e4284ac563723b498ac30e6741bbf9cb0139450..2308fe279fca54332f6938cb02a607805aa283b2 100644
--- a/ash/common/system/user/tray_user_unittest.cc
+++ b/ash/common/system/user/tray_user_unittest.cc
@@ -18,7 +18,7 @@
#include "base/strings/utf_string_conversions.h"
#include "components/signin/core/account_id/account_id.h"
#include "components/user_manager/user_info.h"
-#include "ui/accessibility/ax_view_state.h"
+#include "ui/accessibility/ax_node_data.h"
#include "ui/events/test/event_generator.h"
#include "ui/gfx/animation/animation_container_element.h"
#include "ui/views/view.h"
@@ -157,12 +157,12 @@ TEST_F(TrayUserTest, AccessibleLabelContainsSingleUserInfo) {
views::View* view =
tray_user(0)->user_view_for_test()->user_card_view_for_test();
- ui::AXViewState state;
- view->GetAccessibleState(&state);
+ ui::AXNodeData node_data;
+ view->GetAccessibleNodeData(&node_data);
EXPECT_EQ(
base::UTF8ToUTF16("Über tray Über tray Über tray Über tray First@tray"),
- state.name);
- EXPECT_EQ(ui::AX_ROLE_STATIC_TEXT, state.role);
+ node_data.GetString16Attribute(ui::AX_ATTR_NAME));
+ EXPECT_EQ(ui::AX_ROLE_STATIC_TEXT, node_data.role);
}
TEST_F(TrayUserTest, AccessibleLabelContainsMultiUserInfo) {
@@ -172,12 +172,12 @@ TEST_F(TrayUserTest, AccessibleLabelContainsMultiUserInfo) {
views::View* view =
tray_user(0)->user_view_for_test()->user_card_view_for_test();
- ui::AXViewState state;
- view->GetAccessibleState(&state);
+ ui::AXNodeData node_data;
+ view->GetAccessibleNodeData(&node_data);
EXPECT_EQ(
base::UTF8ToUTF16("Über tray Über tray Über tray Über tray First@tray"),
- state.name);
- EXPECT_EQ(ui::AX_ROLE_BUTTON, state.role);
+ node_data.GetString16Attribute(ui::AX_ATTR_NAME));
+ EXPECT_EQ(ui::AX_ROLE_BUTTON, node_data.role);
}
#if defined(OS_CHROMEOS)
« no previous file with comments | « ash/common/system/user/button_from_view.cc ('k') | ash/common/system/user/user_card_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698