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

Unified Diff: ui/views/window/dialog_delegate_unittest.cc

Issue 1216673005: views::LabelButton should not call virtual methods from its constructor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20150703-Views-ButtonBorderRefactor
Patch Set: self review Created 5 years, 5 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 | « ui/views/window/dialog_client_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/dialog_delegate_unittest.cc
diff --git a/ui/views/window/dialog_delegate_unittest.cc b/ui/views/window/dialog_delegate_unittest.cc
index 42923399b5e68b41223a36ee078d30a916962f59..26e0a97293886f6ca184e1b63f3ca2c7cc1efa37 100644
--- a/ui/views/window/dialog_delegate_unittest.cc
+++ b/ui/views/window/dialog_delegate_unittest.cc
@@ -127,7 +127,8 @@ TEST_F(DialogTest, DefaultButtons) {
dialog()->PressEnterAndCheckStates(ok_button);
// Focus another button in the dialog, it should become the default.
- LabelButton* button_1 = new LabelButton(dialog(), base::string16());
+ LabelButton* button_1 = new LabelButton(dialog());
+ button_1->InitAsTextbutton(base::string16());
client_view->AddChildView(button_1);
client_view->OnWillChangeFocus(ok_button, button_1);
EXPECT_TRUE(button_1->is_default());
@@ -141,7 +142,8 @@ TEST_F(DialogTest, DefaultButtons) {
dialog()->PressEnterAndCheckStates(ok_button);
// Focus yet another button in the dialog, it should become the default.
- LabelButton* button_2 = new LabelButton(dialog(), base::string16());
+ LabelButton* button_2 = new LabelButton(dialog());
+ button_2->InitAsTextbutton(base::string16());
client_view->AddChildView(button_2);
client_view->OnWillChangeFocus(checkbox, button_2);
EXPECT_FALSE(button_1->is_default());
« no previous file with comments | « ui/views/window/dialog_client_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698