Chromium Code Reviews| Index: ui/gfx/font_list_unittest.cc |
| diff --git a/ui/gfx/font_list_unittest.cc b/ui/gfx/font_list_unittest.cc |
| index 6dcbb855d083d4483fb3e85e110cad02714fe174..a9a59542228dd11e64f636bedf9c5f6a3cb9ba49 100644 |
| --- a/ui/gfx/font_list_unittest.cc |
| +++ b/ui/gfx/font_list_unittest.cc |
| @@ -266,24 +266,23 @@ TEST(FontListTest, Fonts_GetHeight_GetBaseline) { |
| EXPECT_EQ(font1.GetBaseline(), font_list1.GetBaseline()); |
| // If there are two different fonts, the font list returns the max value |
| - // for ascent and descent. |
| + // for the baseline (ascent) and height. |
|
msw
2015/01/13 22:43:59
nit: revert this comment for the height, it's actu
|
| Font font2("Symbol", 16); |
| ASSERT_EQ("symbol", |
| base::StringToLowerASCII(font2.GetActualFontNameForTesting())); |
| EXPECT_NE(font1.GetBaseline(), font2.GetBaseline()); |
| - EXPECT_NE(font1.GetHeight() - font1.GetBaseline(), |
| - font2.GetHeight() - font2.GetBaseline()); |
| + EXPECT_NE(font1.GetHeight(), font2.GetHeight()); |
|
msw
2015/01/13 21:59:57
nit: can you leave this check as it was?
ananta
2015/01/13 22:21:46
No. This check fails on DW and also fails with GDI
msw
2015/01/13 22:43:59
That's unfortunate, the test loses value if we can
ananta
2015/01/13 23:39:40
Added a TODO
|
| std::vector<Font> fonts; |
| fonts.push_back(font1); |
| fonts.push_back(font2); |
| FontList font_list_mix(fonts); |
| // ascent of FontList == max(ascent of Fonts) |
| + EXPECT_EQ(std::max(font1.GetBaseline(), font2.GetBaseline()), |
| + font_list_mix.GetBaseline()); |
| + // descent of FontList == max(descent of Fonts) |
| EXPECT_EQ(std::max(font1.GetHeight() - font1.GetBaseline(), |
| font2.GetHeight() - font2.GetBaseline()), |
| font_list_mix.GetHeight() - font_list_mix.GetBaseline()); |
| - // descent of FontList == max(descent of Fonts) |
| - EXPECT_EQ(std::max(font1.GetBaseline(), font2.GetBaseline()), |
| - font_list_mix.GetBaseline()); |
| } |
| TEST(FontListTest, Fonts_DeriveWithHeightUpperBound) { |