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

Unified Diff: ui/views/controls/button/label_button_unittest.cc

Issue 1819753003: Allow various font weights in gfx. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a lost comment and modify a render text unittest to not test black because of test env font con… Created 4 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 | « ui/views/controls/button/label_button.cc ('k') | ui/views/controls/styled_label.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 face1beeb89dc4d65a6c6011b73a14bc7ea7cba5..a17a61001e9d52b7a16625e945b4635ef800ec99 100644
--- a/ui/views/controls/button/label_button_unittest.cc
+++ b/ui/views/controls/button/label_button_unittest.cc
@@ -347,7 +347,8 @@ TEST_F(LabelButtonTest, ButtonStyleIsDefaultStyle) {
gfx::Size non_default_size = button->label()->size();
EXPECT_EQ(button->label()->GetPreferredSize().width(),
non_default_size.width());
- EXPECT_FALSE(button->label()->font_list().GetFontStyle() & gfx::Font::BOLD);
+ EXPECT_EQ(button->label()->font_list().GetFontWeight(),
+ gfx::Font::Weight::NORMAL);
EXPECT_EQ(styled_normal_text_color_, button->label()->enabled_color());
button->SetIsDefault(true);
button->SizeToPreferredSize();
@@ -355,10 +356,12 @@ TEST_F(LabelButtonTest, ButtonStyleIsDefaultStyle) {
EXPECT_EQ(styled_highlight_text_color_, button->label()->enabled_color());
if (PlatformStyle::kDefaultLabelButtonHasBoldFont) {
EXPECT_NE(non_default_size, button->label()->size());
- EXPECT_TRUE(button->label()->font_list().GetFontStyle() & gfx::Font::BOLD);
+ EXPECT_EQ(button->label()->font_list().GetFontWeight(),
+ gfx::Font::Weight::BOLD);
} else {
EXPECT_EQ(non_default_size, button->label()->size());
- EXPECT_FALSE(button->label()->font_list().GetFontStyle() & gfx::Font::BOLD);
+ EXPECT_EQ(button->label()->font_list().GetFontWeight(),
+ gfx::Font::Weight::NORMAL);
}
}
« no previous file with comments | « ui/views/controls/button/label_button.cc ('k') | ui/views/controls/styled_label.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698