| Index: ui/gfx/font_unittest.cc
|
| diff --git a/ui/gfx/font_unittest.cc b/ui/gfx/font_unittest.cc
|
| index 32216d61fbed1a766e3873027861fcd0006c49a7..918873588f04158bbf0f7260949cc1adb8d6471c 100644
|
| --- a/ui/gfx/font_unittest.cc
|
| +++ b/ui/gfx/font_unittest.cc
|
| @@ -15,8 +15,6 @@
|
| #include "ui/gfx/platform_font_win.h"
|
| #endif
|
|
|
| -using base::ASCIIToUTF16;
|
| -
|
| namespace gfx {
|
| namespace {
|
|
|
| @@ -72,7 +70,7 @@ TEST_F(FontTest, LoadArial) {
|
|
|
| TEST_F(FontTest, LoadArialBold) {
|
| Font cf("Arial", 16);
|
| - Font bold(cf.DeriveFont(0, Font::BOLD));
|
| + Font bold(cf.Derive(0, Font::BOLD));
|
| NativeFont native = bold.GetNativeFont();
|
| EXPECT_TRUE(native);
|
| EXPECT_EQ(bold.GetStyle(), Font::BOLD);
|
| @@ -108,22 +106,6 @@ TEST_F(FontTest, AvgWidths) {
|
| EXPECT_GT(cf.GetExpectedTextWidth(3), cf.GetExpectedTextWidth(2));
|
| }
|
|
|
| -TEST_F(FontTest, AvgCharWidth) {
|
| - Font cf("Arial", 16);
|
| - EXPECT_GT(cf.GetAverageCharacterWidth(), 0);
|
| -}
|
| -
|
| -TEST_F(FontTest, Widths) {
|
| - Font cf("Arial", 16);
|
| - EXPECT_EQ(cf.GetStringWidth(base::string16()), 0);
|
| - EXPECT_GT(cf.GetStringWidth(ASCIIToUTF16("a")),
|
| - cf.GetStringWidth(base::string16()));
|
| - EXPECT_GT(cf.GetStringWidth(ASCIIToUTF16("ab")),
|
| - cf.GetStringWidth(ASCIIToUTF16("a")));
|
| - EXPECT_GT(cf.GetStringWidth(ASCIIToUTF16("abc")),
|
| - cf.GetStringWidth(ASCIIToUTF16("ab")));
|
| -}
|
| -
|
| #if !defined(OS_WIN)
|
| // On Windows, Font::GetActualFontNameForTesting() doesn't work well for now.
|
| // http://crbug.com/327287
|
| @@ -141,21 +123,21 @@ TEST_F(FontTest, GetActualFontNameForTesting) {
|
| #endif
|
|
|
| #if defined(OS_WIN)
|
| -TEST_F(FontTest, DeriveFontResizesIfSizeTooSmall) {
|
| +TEST_F(FontTest, DeriveResizesIfSizeTooSmall) {
|
| Font cf("Arial", 8);
|
| // The minimum font size is set to 5 in browser_main.cc.
|
| ScopedMinimumFontSizeCallback minimum_size(5);
|
|
|
| - Font derived_font = cf.DeriveFont(-4);
|
| + Font derived_font = cf.Derive(-4, cf.GetStyle());
|
| EXPECT_EQ(5, derived_font.GetFontSize());
|
| }
|
|
|
| -TEST_F(FontTest, DeriveFontKeepsOriginalSizeIfHeightOk) {
|
| +TEST_F(FontTest, DeriveKeepsOriginalSizeIfHeightOk) {
|
| Font cf("Arial", 8);
|
| // The minimum font size is set to 5 in browser_main.cc.
|
| ScopedMinimumFontSizeCallback minimum_size(5);
|
|
|
| - Font derived_font = cf.DeriveFont(-2);
|
| + Font derived_font = cf.Derive(-2, cf.GetStyle());
|
| EXPECT_EQ(6, derived_font.GetFontSize());
|
| }
|
| #endif // defined(OS_WIN)
|
|
|