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

Unified Diff: ui/gfx/platform_font_win_unittest.cc

Issue 138013004: Clean-up: Renames gfx::Font's methods and removes its obsolete methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unused methods in PlatformFont. Created 6 years, 10 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') | ui/gfx/render_text_win.cc » ('j') | 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 bfbe92203d1a6ccb02a1d2cd17c49415d3474729..1ecdde1d352db9d7b25e5a6c3ee62be48d79ca0a 100644
--- a/ui/gfx/platform_font_win_unittest.cc
+++ b/ui/gfx/platform_font_win_unittest.cc
@@ -20,15 +20,15 @@ gfx::Font AdjustFontSizeForHeight(const gfx::Font& base_font,
Font expected_font = base_font;
if (base_font.GetHeight() < target_height) {
// Increase size while height is <= |target_height|.
- Font larger_font = base_font.DeriveFont(1, 0);
+ Font larger_font = base_font.Derive(1, 0);
while (larger_font.GetHeight() <= target_height) {
expected_font = larger_font;
- larger_font = larger_font.DeriveFont(1, 0);
+ larger_font = larger_font.Derive(1, 0);
}
} else if (expected_font.GetHeight() > target_height) {
// Decrease size until height is <= |target_height|.
do {
- expected_font = expected_font.DeriveFont(-1, 0);
+ expected_font = expected_font.Derive(-1, 0);
} while (expected_font.GetHeight() > target_height);
}
return expected_font;
@@ -60,7 +60,7 @@ TEST(PlatformFontWinTest, DeriveFontWithHeight) {
EXPECT_EQ(Font::BOLD, derived_font.GetStyle());
// Test that deriving from the new font has the expected result.
- Font rederived_font = derived_font.DeriveFont(1, 0);
+ Font rederived_font = derived_font.Derive(1, 0);
expected_font = Font(derived_font.GetFontName(),
derived_font.GetFontSize() + 1);
EXPECT_EQ(expected_font.GetFontName(), rederived_font.GetFontName());
« no previous file with comments | « ui/gfx/platform_font_win.cc ('k') | ui/gfx/render_text_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698