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

Unified Diff: ui/views/controls/styled_label_unittest.cc

Issue 1819753003: Allow various font weights in gfx. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes for review issues. Created 4 years, 9 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/styled_label_unittest.cc
diff --git a/ui/views/controls/styled_label_unittest.cc b/ui/views/controls/styled_label_unittest.cc
index cae7f67744eefaf82e0d533956c3250409c0ba4c..72f6ea764a4e5ccc0854353525afe72d79a2aa95 100644
--- a/ui/views/controls/styled_label_unittest.cc
+++ b/ui/views/controls/styled_label_unittest.cc
@@ -257,7 +257,7 @@ TEST_F(StyledLabelTest, StyledRangeBold) {
InitStyledLabel(bold_text + text);
StyledLabel::RangeStyleInfo style_info;
- style_info.font_style = gfx::Font::BOLD;
+ style_info.weight = gfx::Font::WEIGHT_BOLD;
msw 2016/03/22 18:24:11 Update enum values in this file.
Mikus 2016/03/23 17:53:22 Done.
styled()->AddStyleRange(
gfx::Range(0u, static_cast<uint32_t>(bold_text.size())), style_info);
@@ -265,7 +265,7 @@ TEST_F(StyledLabelTest, StyledRangeBold) {
// and normal style.
Label label(ASCIIToUTF16(bold_text));
const gfx::Size normal_label_size = label.GetPreferredSize();
- label.SetFontList(label.font_list().DeriveWithStyle(gfx::Font::BOLD));
+ label.SetFontList(label.font_list().DeriveWithWeight(gfx::Font::WEIGHT_BOLD));
const gfx::Size bold_label_size = label.GetPreferredSize();
ASSERT_GE(bold_label_size.width(), normal_label_size.width());
@@ -291,13 +291,13 @@ TEST_F(StyledLabelTest, StyledRangeBold) {
ASSERT_EQ(std::string(Label::kViewClassName),
styled()->child_at(0)->GetClassName());
EXPECT_EQ(
- gfx::Font::BOLD,
- static_cast<Label*>(styled()->child_at(0))->font_list().GetFontStyle());
+ gfx::Font::WEIGHT_BOLD,
+ static_cast<Label*>(styled()->child_at(0))->font_list().GetFontWeight());
ASSERT_EQ(std::string(Label::kViewClassName),
styled()->child_at(1)->GetClassName());
EXPECT_EQ(
- gfx::Font::BOLD,
- static_cast<Label*>(styled()->child_at(1))->font_list().GetFontStyle());
+ gfx::Font::WEIGHT_BOLD,
+ static_cast<Label*>(styled()->child_at(1))->font_list().GetFontWeight());
ASSERT_EQ(std::string(Label::kViewClassName),
styled()->child_at(2)->GetClassName());
EXPECT_EQ(

Powered by Google App Engine
This is Rietveld 408576698