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

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

Issue 9117012: Rename visual style "password" to "obscured" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 8 years, 11 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/native_textfield_views_unittest.cc
diff --git a/ui/views/controls/textfield/native_textfield_views_unittest.cc b/ui/views/controls/textfield/native_textfield_views_unittest.cc
index 7b654d21b92ade2ef8e571e13811c50cef72c4a0..57101563d62d6e88c83082735891bc73161108db 100644
--- a/ui/views/controls/textfield/native_textfield_views_unittest.cc
+++ b/ui/views/controls/textfield/native_textfield_views_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -499,7 +499,7 @@ TEST_F(NativeTextfieldViewsTest, InsertionDeletionTest) {
}
TEST_F(NativeTextfieldViewsTest, PasswordTest) {
- InitTextfield(Textfield::STYLE_PASSWORD);
+ InitTextfield(Textfield::STYLE_OBSCURED);
EXPECT_EQ(ui::TEXT_INPUT_TYPE_PASSWORD, GetTextInputType());
@@ -511,28 +511,28 @@ TEST_F(NativeTextfieldViewsTest, PasswordTest) {
EXPECT_TRUE(last_contents_.empty());
}
-TEST_F(NativeTextfieldViewsTest, InputTypeSetsPassword) {
+TEST_F(NativeTextfieldViewsTest, InputTypeSetsObscured) {
InitTextfield(Textfield::STYLE_DEFAULT);
// Defaults to TEXT
EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, GetTextInputType());
- // Setting to passwords also sets password state of textfield.
+ // Setting to TEXT_INPUT_TYPE_PASSWORD also sets obscured state of textfield.
textfield_->SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD);
EXPECT_EQ(ui::TEXT_INPUT_TYPE_PASSWORD, GetTextInputType());
- EXPECT_TRUE(textfield_->IsPassword());
+ EXPECT_TRUE(textfield_->IsObscured());
}
-TEST_F(NativeTextfieldViewsTest, PasswordSetsInputType) {
+TEST_F(NativeTextfieldViewsTest, ObscuredSetsInputType) {
InitTextfield(Textfield::STYLE_DEFAULT);
// Defaults to TEXT
EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, GetTextInputType());
- textfield_->SetPassword(true);
+ textfield_->SetObscured(true);
EXPECT_EQ(ui::TEXT_INPUT_TYPE_PASSWORD, GetTextInputType());
- textfield_->SetPassword(false);
+ textfield_->SetObscured(false);
EXPECT_EQ(ui::TEXT_INPUT_TYPE_TEXT, GetTextInputType());
}
@@ -1114,7 +1114,7 @@ TEST_F(NativeTextfieldViewsTest, TextInputClientTest) {
textfield_->SetReadOnly(false);
input_method_->Clear();
- textfield_->SetPassword(true);
+ textfield_->SetObscured(true);
EXPECT_TRUE(input_method_->text_input_type_changed());
EXPECT_TRUE(textfield_->GetTextInputClient());
}
« no previous file with comments | « ui/views/controls/textfield/native_textfield_views.cc ('k') | ui/views/controls/textfield/native_textfield_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698