diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-12 16:24:45 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-12 16:24:45 +0000 |
commit | 76fcc3e9dc467366b9d1938834d7faff595ab873 (patch) | |
tree | dcfc78d6c356be77a902a3fe5e59a6590fe7521e /views/controls/label_unittest.cc | |
parent | 3a742fcae0c094dd1ea11354fb3dcfe9ccc07a73 (diff) | |
download | chromium_src-76fcc3e9dc467366b9d1938834d7faff595ab873.zip chromium_src-76fcc3e9dc467366b9d1938834d7faff595ab873.tar.gz chromium_src-76fcc3e9dc467366b9d1938834d7faff595ab873.tar.bz2 |
Revert 71169 - Revert 71167 - Remove wstring from gfx.
BUG=68882
TEST=no visible changes; all tests pass
Review URL: http://codereview.chromium.org/6121004
TBR=avi@chromium.org
Review URL: http://codereview.chromium.org/6134010
TBR=joi@chromium.org
Review URL: http://codereview.chromium.org/6130008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71176 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/label_unittest.cc')
-rw-r--r-- | views/controls/label_unittest.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/views/controls/label_unittest.cc b/views/controls/label_unittest.cc index 267d260..504861e 100644 --- a/views/controls/label_unittest.cc +++ b/views/controls/label_unittest.cc @@ -15,22 +15,22 @@ namespace views { // All text sizing measurements (width and height) should be greater than this. const int kMinTextDimension = 4; -#if defined(WIN_OS) +#if defined(OS_WIN) // Courier is failing on linux because it's non scalable. TEST(LabelTest, FontPropertyCourier) { Label label; - std::wstring font_name(L"courier"); - gfx::Font font = gfx::Font::CreateFont(font_name, 30); + string16 font_name(ASCIIToUTF16("courier")); + gfx::Font font(font_name, 30); label.SetFont(font); gfx::Font font_used = label.font(); - EXPECT_EQ(font_name, font_used.FontName()); - EXPECT_EQ(30, font_used.FontSize()); + EXPECT_EQ(font_name, font_used.GetFontName()); + EXPECT_EQ(30, font_used.GetFontSize()); } #endif TEST(LabelTest, FontPropertyArial) { Label label; - std::wstring font_name(L"arial"); + string16 font_name(ASCIIToUTF16("arial")); gfx::Font font(font_name, 30); label.SetFont(font); gfx::Font font_used = label.font(); @@ -214,7 +214,7 @@ TEST(LabelTest, MultiLineSizing) { // SizeToFit with limited width. label.SizeToFit(required_width - 1); int constrained_width = label.GetLocalBounds(true).width(); -#if defined(WIN_OS) +#if defined(OS_WIN) // Canvas::SizeStringInt (in app/gfx/canvas_linux.cc) // has to be fixed to return the size that fits to given width/height. EXPECT_LT(constrained_width, required_width); @@ -229,7 +229,7 @@ TEST(LabelTest, MultiLineSizing) { int required_height = label.GetHeightForWidth(required_width); EXPECT_GT(required_height, kMinTextDimension); int height_for_constrained_width = label.GetHeightForWidth(constrained_width); -#if defined(WIN_OS) +#if defined(OS_WIN) // Canvas::SizeStringInt (in app/gfx/canvas_linux.cc) // has to be fixed to return the size that fits to given width/height. EXPECT_GT(height_for_constrained_width, required_height); @@ -261,7 +261,7 @@ TEST(LabelTest, MultiLineSizing) { // calculation. If it is, then the height will grow when width // is shrunk. int height1 = label.GetHeightForWidth(required_width_with_border - 1); -#if defined(WIN_OS) +#if defined(OS_WIN) // Canvas::SizeStringInt (in app/gfx/canvas_linux.cc) // has to be fixed to return the size that fits to given width/height. EXPECT_GT(height1, required_height_with_border); |