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

Unified Diff: ui/views/controls/textfield/textfield_unittest.cc

Issue 2934993002: MacViews a11y: Allow VoiceOver to read out views::Label word-by-word. (Closed)
Patch Set: Fix TextfieldTest.AccessiblePasswordTest Created 3 years, 6 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: ui/views/controls/textfield/textfield_unittest.cc
diff --git a/ui/views/controls/textfield/textfield_unittest.cc b/ui/views/controls/textfield/textfield_unittest.cc
index 2a6546235197ad5e93bdfcb265fd6177de0cd659..b1639ddfe3bf1bca84896593d50ab12ca948ee03 100644
--- a/ui/views/controls/textfield/textfield_unittest.cc
+++ b/ui/views/controls/textfield/textfield_unittest.cc
@@ -3142,8 +3142,13 @@ TEST_F(TextfieldTest, AccessiblePasswordTest) {
ui::AXNodeData node_data_protected;
textfield_->GetAccessibleNodeData(&node_data_protected);
EXPECT_EQ(ui::AX_ROLE_TEXT_FIELD, node_data_protected.role);
+#if defined(OS_MACOSX)
+ EXPECT_EQ(UTF8ToUTF16("••••••••"),
+ node_data_protected.GetString16Attribute(ui::AX_ATTR_VALUE));
+#else
EXPECT_EQ(ASCIIToUTF16("********"),
node_data_protected.GetString16Attribute(ui::AX_ATTR_VALUE));
+#endif
EXPECT_TRUE(node_data_protected.HasState(ui::AX_STATE_PROTECTED));
}
« no previous file with comments | « ui/views/controls/textfield/textfield.cc ('k') | ui/views/widget/native_widget_mac_accessibility_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698