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

Unified Diff: trunk/src/ui/gfx/font_list_unittest.cc

Issue 19270002: This caused failures in ui_unittests FontListTest.Fonts_GetHeight_GetBaseline (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 5 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 | « trunk/src/ui/gfx/font_list.cc ('k') | trunk/src/ui/gfx/render_text.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ui/gfx/font_list_unittest.cc
===================================================================
--- trunk/src/ui/gfx/font_list_unittest.cc (revision 211668)
+++ trunk/src/ui/gfx/font_list_unittest.cc (working copy)
@@ -232,30 +232,4 @@
EXPECT_EQ("Sans serif|5", FontToString(derived_fonts[1]));
}
-TEST(FontListTest, Fonts_GetHeight_GetBaseline) {
- // If the font list has only one font, the height and baseline must be
- // the same.
- Font font_arial8("Arial", 8);
- FontList font_list_arial8("Arial, 8px");
- EXPECT_EQ(font_arial8.GetHeight(), font_list_arial8.GetHeight());
- EXPECT_EQ(font_arial8.GetBaseline(), font_list_arial8.GetBaseline());
-
- Font font_sansserif10("Sans serif", 10);
- FontList font_list_sansserif10("Sans serif, 10px");
- EXPECT_EQ(font_sansserif10.GetHeight(), font_list_sansserif10.GetHeight());
- EXPECT_EQ(font_sansserif10.GetBaseline(),
- font_list_sansserif10.GetBaseline());
-
- // If there are two different fonts, the font list returns the max value.
- FontList font_list_mix(font_arial8);
- // Bypass DCHECK in a constructor of FontList which checks that all the fonts
- // have the same font size.
- font_list_mix.fonts_.push_back(font_sansserif10);
- // Helvetica 20px must be larger than Arial 10px.
- EXPECT_GT(font_sansserif10.GetHeight(), font_arial8.GetHeight());
- EXPECT_EQ(font_sansserif10.GetHeight(), font_list_mix.GetHeight());
- EXPECT_GT(font_sansserif10.GetBaseline(), font_arial8.GetBaseline());
- EXPECT_EQ(font_sansserif10.GetBaseline(), font_list_mix.GetBaseline());
-}
-
} // namespace gfx
« no previous file with comments | « trunk/src/ui/gfx/font_list.cc ('k') | trunk/src/ui/gfx/render_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698