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

Unified Diff: ui/gfx/platform_font_win_unittest.cc

Issue 11143002: Don't hang if can't downsize font. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « ui/gfx/platform_font_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/platform_font_win_unittest.cc
diff --git a/ui/gfx/platform_font_win_unittest.cc b/ui/gfx/platform_font_win_unittest.cc
index 9502875f3a7e89ab9b609ed1e06ccfaffb4bb9f6..bfbe92203d1a6ccb02a1d2cd17c49415d3474729 100644
--- a/ui/gfx/platform_font_win_unittest.cc
+++ b/ui/gfx/platform_font_win_unittest.cc
@@ -92,4 +92,13 @@ TEST(PlatformFontWinTest, DeriveFontWithHeight_MinSize) {
PlatformFontWin::get_minimum_font_size_callback = old_callback;
}
+TEST(PlatformFontWinTest, DeriveFontWithHeight_TooSmall) {
+ const Font base_font;
+ PlatformFontWin* platform_font =
+ static_cast<PlatformFontWin*>(base_font.platform_font());
+
+ const Font derived_font = platform_font->DeriveFontWithHeight(1, 0);
+ EXPECT_GT(derived_font.GetHeight(), 1);
+}
+
} // namespace gfx
« no previous file with comments | « ui/gfx/platform_font_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698