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

Unified Diff: ui/views/controls/label_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 | « ui/views/controls/label.cc ('k') | ui/views/controls/link.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/label_unittest.cc
diff --git a/ui/views/controls/label_unittest.cc b/ui/views/controls/label_unittest.cc
index f9ec47cbb3828142beee27c38be438d8301d7d67..05265584bb466d860e917e9f0998a61400780222 100644
--- a/ui/views/controls/label_unittest.cc
+++ b/ui/views/controls/label_unittest.cc
@@ -10,7 +10,7 @@
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "ui/accessibility/ax_view_state.h"
+#include "ui/accessibility/ax_node_data.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/compositor/canvas_painter.h"
#include "ui/gfx/canvas.h"
@@ -339,11 +339,11 @@ TEST_F(LabelTest, Accessibility) {
Label label;
label.SetText(ASCIIToUTF16("My special text."));
- ui::AXViewState state;
- label.GetAccessibleState(&state);
- EXPECT_EQ(ui::AX_ROLE_STATIC_TEXT, state.role);
- EXPECT_EQ(label.text(), state.name);
- EXPECT_TRUE(state.HasStateFlag(ui::AX_STATE_READ_ONLY));
+ ui::AXNodeData node_data;
+ label.GetAccessibleNodeData(&node_data);
+ EXPECT_EQ(ui::AX_ROLE_STATIC_TEXT, node_data.role);
+ EXPECT_EQ(label.text(), node_data.GetString16Attribute(ui::AX_ATTR_NAME));
+ EXPECT_TRUE(node_data.HasStateFlag(ui::AX_STATE_READ_ONLY));
}
TEST_F(LabelTest, TextChangeWithoutLayout) {
« no previous file with comments | « ui/views/controls/label.cc ('k') | ui/views/controls/link.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698