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

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

Issue 7057014: Variety of tweaks to View API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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
« no previous file with comments | « views/controls/tabbed_pane/tabbed_pane.cc ('k') | views/controls/textfield/textfield.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/textfield/native_textfield_views_unittest.cc
===================================================================
--- views/controls/textfield/native_textfield_views_unittest.cc (revision 86083)
+++ views/controls/textfield/native_textfield_views_unittest.cc (working copy)
@@ -167,12 +167,12 @@
textfield_view_
= static_cast<NativeTextfieldViews*>(textfield_->native_wrapper());
- textfield_->SetID(1);
+ textfield_->set_id(1);
for (int i = 1; i < count; i++) {
Textfield* textfield = new Textfield(style);
container->AddChildView(textfield);
- textfield->SetID(i + 1);
+ textfield->set_id(i + 1);
}
DCHECK(textfield_view_);
@@ -490,35 +490,35 @@
InitTextfields(Textfield::STYLE_DEFAULT, 3);
textfield_->RequestFocus();
- EXPECT_EQ(1, GetFocusedView()->GetID());
+ EXPECT_EQ(1, GetFocusedView()->id());
widget_->GetFocusManager()->AdvanceFocus(false);
- EXPECT_EQ(2, GetFocusedView()->GetID());
+ EXPECT_EQ(2, GetFocusedView()->id());
widget_->GetFocusManager()->AdvanceFocus(false);
- EXPECT_EQ(3, GetFocusedView()->GetID());
+ EXPECT_EQ(3, GetFocusedView()->id());
// Cycle back to the first textfield.
widget_->GetFocusManager()->AdvanceFocus(false);
- EXPECT_EQ(1, GetFocusedView()->GetID());
+ EXPECT_EQ(1, GetFocusedView()->id());
widget_->GetFocusManager()->AdvanceFocus(true);
- EXPECT_EQ(3, GetFocusedView()->GetID());
+ EXPECT_EQ(3, GetFocusedView()->id());
widget_->GetFocusManager()->AdvanceFocus(true);
- EXPECT_EQ(2, GetFocusedView()->GetID());
+ EXPECT_EQ(2, GetFocusedView()->id());
widget_->GetFocusManager()->AdvanceFocus(true);
- EXPECT_EQ(1, GetFocusedView()->GetID());
+ EXPECT_EQ(1, GetFocusedView()->id());
// Cycle back to the last textfield.
widget_->GetFocusManager()->AdvanceFocus(true);
- EXPECT_EQ(3, GetFocusedView()->GetID());
+ EXPECT_EQ(3, GetFocusedView()->id());
// Request focus should still work.
textfield_->RequestFocus();
- EXPECT_EQ(1, GetFocusedView()->GetID());
+ EXPECT_EQ(1, GetFocusedView()->id());
// Test if clicking on textfield view sets the focus to textfield_.
widget_->GetFocusManager()->AdvanceFocus(true);
- EXPECT_EQ(3, GetFocusedView()->GetID());
+ EXPECT_EQ(3, GetFocusedView()->id());
MouseEvent click(ui::ET_MOUSE_PRESSED, 0, 0, ui::EF_LEFT_BUTTON_DOWN);
textfield_view_->OnMousePressed(click);
- EXPECT_EQ(1, GetFocusedView()->GetID());
+ EXPECT_EQ(1, GetFocusedView()->id());
}
void VerifyTextfieldContextMenuContents(bool textfield_has_selection,
« no previous file with comments | « views/controls/tabbed_pane/tabbed_pane.cc ('k') | views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698