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

Unified Diff: ui/views/controls/button/blue_button_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: selfnits 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
Index: ui/views/controls/button/blue_button_unittest.cc
diff --git a/ui/views/controls/button/blue_button_unittest.cc b/ui/views/controls/button/blue_button_unittest.cc
index d2f92a3e4a1cfaf916787122ba8e077f22a42082..489ec63a632a40346363a38565a5b125735439e2 100644
--- a/ui/views/controls/button/blue_button_unittest.cc
+++ b/ui/views/controls/button/blue_button_unittest.cc
@@ -17,7 +17,7 @@ namespace {
class TestBlueButton : public BlueButton {
public:
- TestBlueButton() : BlueButton(NULL, base::ASCIIToUTF16("foo")) {}
+ TestBlueButton() : BlueButton(nullptr) { Init(base::ASCIIToUTF16("foo")); }
~TestBlueButton() override {}
using BlueButton::OnNativeThemeChanged;
@@ -32,7 +32,8 @@ typedef ViewsTestBase BlueButtonTest;
TEST_F(BlueButtonTest, Border) {
// Compared to a normal LabelButton...
- LabelButton button(NULL, base::ASCIIToUTF16("foo"));
+ LabelButton button(nullptr);
+ button.Init(base::ASCIIToUTF16("foo"));
button.SetBoundsRect(gfx::Rect(gfx::Point(0, 0), button.GetPreferredSize()));
gfx::Canvas button_canvas(button.bounds().size(), 1.0, true);
button.border()->Paint(button, &button_canvas);

Powered by Google App Engine
This is Rietveld 408576698