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

Unified Diff: ui/views/view_unittest.cc

Issue 120503005: Merge NativeTextfieldViews into views::Textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix touch drag and drop unit test. Created 6 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/view_unittest.cc
diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
index af3eb6551f9e4a045c00d9c3e181c7565d392509..00aef1c4f168d359899066b42f7a687b606a5a5d 100644
--- a/ui/views/view_unittest.cc
+++ b/ui/views/view_unittest.cc
@@ -1518,17 +1518,17 @@ TEST_F(ViewTest, Textfield) {
// Test setting, appending text.
textfield->SetText(kText);
- EXPECT_EQ(kText, textfield->text());
+ EXPECT_EQ(kText, textfield->GetText());
textfield->AppendText(kExtraText);
- EXPECT_EQ(kText + kExtraText, textfield->text());
+ EXPECT_EQ(kText + kExtraText, textfield->GetText());
textfield->SetText(base::string16());
- EXPECT_EQ(kEmptyString, textfield->text());
+ EXPECT_EQ(kEmptyString, textfield->GetText());
// Test selection related methods.
textfield->SetText(kText);
EXPECT_EQ(kEmptyString, textfield->GetSelectedText());
textfield->SelectAll(false);
- EXPECT_EQ(kText, textfield->text());
+ EXPECT_EQ(kText, textfield->GetText());
textfield->ClearSelection();
EXPECT_EQ(kEmptyString, textfield->GetSelectedText());
@@ -1619,18 +1619,18 @@ TEST_F(ViewTest, TextfieldCutCopyPaste) {
// Attempting to paste kNormalText in a read-only text-field should fail.
read_only->SelectAll(false);
read_only->ExecuteCommand(IDS_APP_PASTE);
- EXPECT_EQ(kReadOnlyText, read_only->text());
+ EXPECT_EQ(kReadOnlyText, read_only->GetText());
password->SelectAll(false);
password->ExecuteCommand(IDS_APP_PASTE);
- EXPECT_EQ(kNormalText, password->text());
+ EXPECT_EQ(kNormalText, password->GetText());
// Copy from |read_only| to observe a change in the normal textfield text.
read_only->SelectAll(false);
read_only->ExecuteCommand(IDS_APP_COPY);
normal->SelectAll(false);
normal->ExecuteCommand(IDS_APP_PASTE);
- EXPECT_EQ(kReadOnlyText, normal->text());
+ EXPECT_EQ(kReadOnlyText, normal->GetText());
widget->CloseNow();
}

Powered by Google App Engine
This is Rietveld 408576698