Index: ui/views/controls/button/label_button_unittest.cc |
diff --git a/ui/views/controls/button/label_button_unittest.cc b/ui/views/controls/button/label_button_unittest.cc |
index 05a81a77fa16feceaf5c0a8ff195af91733673c7..941332fea361d7cbe9d405e8f66c9d3e096151b6 100644 |
--- a/ui/views/controls/button/label_button_unittest.cc |
+++ b/ui/views/controls/button/label_button_unittest.cc |
@@ -30,7 +30,8 @@ typedef ViewsTestBase LabelButtonTest; |
TEST_F(LabelButtonTest, Init) { |
const base::string16 text(ASCIIToUTF16("abc")); |
- LabelButton button(NULL, text); |
+ LabelButton button(nullptr); |
+ button.InitAsTextbutton(text); |
EXPECT_TRUE(button.GetImage(Button::STATE_NORMAL).isNull()); |
EXPECT_TRUE(button.GetImage(Button::STATE_HOVERED).isNull()); |
@@ -48,7 +49,9 @@ TEST_F(LabelButtonTest, Init) { |
} |
TEST_F(LabelButtonTest, Label) { |
- LabelButton button(NULL, base::string16()); |
+ LabelButton button(nullptr); |
+ EXPECT_TRUE(button.GetText().empty()); |
+ button.InitAsTextbutton(base::string16()); |
EXPECT_TRUE(button.GetText().empty()); |
const gfx::FontList font_list; |
@@ -79,7 +82,8 @@ TEST_F(LabelButtonTest, Label) { |
} |
TEST_F(LabelButtonTest, Image) { |
- LabelButton button(NULL, base::string16()); |
+ LabelButton button(nullptr); |
+ button.InitAsTextbutton(base::string16()); |
const int small_size = 50, large_size = 100; |
const gfx::ImageSkia small_image = CreateTestImage(small_size, small_size); |
@@ -111,7 +115,8 @@ TEST_F(LabelButtonTest, Image) { |
} |
TEST_F(LabelButtonTest, LabelAndImage) { |
- LabelButton button(NULL, base::string16()); |
+ LabelButton button(nullptr); |
+ button.InitAsTextbutton(base::string16()); |
const gfx::FontList font_list; |
const base::string16 text(ASCIIToUTF16("abcdefghijklm")); |
@@ -169,7 +174,8 @@ TEST_F(LabelButtonTest, LabelAndImage) { |
TEST_F(LabelButtonTest, FontList) { |
const base::string16 text(ASCIIToUTF16("abc")); |
- LabelButton button(NULL, text); |
+ LabelButton button(nullptr); |
+ button.InitAsTextbutton(text); |
const gfx::FontList original_font_list = button.GetFontList(); |
const gfx::FontList large_font_list = |
@@ -193,7 +199,8 @@ TEST_F(LabelButtonTest, FontList) { |
TEST_F(LabelButtonTest, ChangeTextSize) { |
const base::string16 text(ASCIIToUTF16("abc")); |
const base::string16 longer_text(ASCIIToUTF16("abcdefghijklm")); |
- LabelButton button(NULL, text); |
+ LabelButton button(nullptr); |
+ button.InitAsTextbutton(text); |
const int original_width = button.GetPreferredSize().width(); |
@@ -208,7 +215,8 @@ TEST_F(LabelButtonTest, ChangeTextSize) { |
} |
TEST_F(LabelButtonTest, ChangeLabelImageSpacing) { |
- LabelButton button(NULL, ASCIIToUTF16("abc")); |
+ LabelButton button(nullptr); |
+ button.InitAsTextbutton(ASCIIToUTF16("abc")); |
button.SetImage(Button::STATE_NORMAL, CreateTestImage(50, 50)); |
const int kOriginalSpacing = 5; |