| Index: ui/gfx/font_unittest.cc
|
| diff --git a/ui/gfx/font_unittest.cc b/ui/gfx/font_unittest.cc
|
| index b93589ddd724af0f43986d5aa55673873c31a028..a5ac50888fb9e3f92f172671f602ac4bca297dc7 100644
|
| --- a/ui/gfx/font_unittest.cc
|
| +++ b/ui/gfx/font_unittest.cc
|
| @@ -158,6 +158,19 @@ TEST_F(FontTest, MAYBE_GetActualFontNameForTesting) {
|
| base::ToLowerASCII(fallback_font.GetActualFontNameForTesting()));
|
| }
|
|
|
| +TEST_F(FontTest, DeriveFont) {
|
| + Font cf("Arial", 8);
|
| + const int kSizeDelta = 2;
|
| + Font cf_underlined =
|
| + cf.Derive(0, cf.GetStyle() | gfx::Font::UNDERLINE, cf.GetWeight());
|
| + Font cf_underlined_resized = cf_underlined.Derive(
|
| + kSizeDelta, cf_underlined.GetStyle(), cf_underlined.GetWeight());
|
| + EXPECT_EQ(cf.GetStyle() | gfx::Font::UNDERLINE,
|
| + cf_underlined_resized.GetStyle());
|
| + EXPECT_EQ(cf.GetFontSize() + kSizeDelta, cf_underlined_resized.GetFontSize());
|
| + EXPECT_EQ(cf.GetWeight(), cf_underlined_resized.GetWeight());
|
| +}
|
| +
|
| #if defined(OS_WIN)
|
| TEST_F(FontTest, DeriveResizesIfSizeTooSmall) {
|
| Font cf("Arial", 8);
|
|
|