Chromium Code Reviews| 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) { |
|
karandeepb
2016/08/05 11:03:07
All the other tests seem to be disabled on Android
Avi (use Gerrit)
2016/08/05 14:54:58
Perhaps you'll find out on the trybots :)
|
| + 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, |
|
karandeepb
2016/08/05 11:03:07
This fails on Mac currently. The derived font does
Avi (use Gerrit)
2016/08/05 14:54:59
As long as it passes with the other changes in the
|
| + 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); |