summaryrefslogtreecommitdiffstats
path: root/gfx/font_unittest.cc
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-12 14:37:16 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-12 14:37:16 +0000
commit3f891cf79f72f4768a15bfae051e08b9211ed8c3 (patch)
tree3cf8d59e7186889184f575fcbe3284e6400fb505 /gfx/font_unittest.cc
parente0c7405b8f24e6c0096285446f94f729e63107df (diff)
downloadchromium_src-3f891cf79f72f4768a15bfae051e08b9211ed8c3.zip
chromium_src-3f891cf79f72f4768a15bfae051e08b9211ed8c3.tar.gz
chromium_src-3f891cf79f72f4768a15bfae051e08b9211ed8c3.tar.bz2
Remove wstring from gfx.
BUG=68882 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6121004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71167 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx/font_unittest.cc')
-rw-r--r--gfx/font_unittest.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/gfx/font_unittest.cc b/gfx/font_unittest.cc
index 3f26507..43eaa7c 100644
--- a/gfx/font_unittest.cc
+++ b/gfx/font_unittest.cc
@@ -46,35 +46,35 @@ int ScopedMinimumFontSizeCallback::minimum_size_ = 0;
TEST_F(FontTest, LoadArial) {
- Font cf(L"Arial", 16);
+ Font cf(ASCIIToUTF16("Arial"), 16);
ASSERT_TRUE(cf.GetNativeFont());
ASSERT_EQ(cf.GetStyle(), Font::NORMAL);
ASSERT_EQ(cf.GetFontSize(), 16);
- ASSERT_EQ(cf.GetFontName(), L"Arial");
+ ASSERT_EQ(cf.GetFontName(), ASCIIToUTF16("Arial"));
}
TEST_F(FontTest, LoadArialBold) {
- Font cf(L"Arial", 16);
+ Font cf(ASCIIToUTF16("Arial"), 16);
Font bold(cf.DeriveFont(0, Font::BOLD));
ASSERT_TRUE(bold.GetNativeFont());
ASSERT_EQ(bold.GetStyle(), Font::BOLD);
}
TEST_F(FontTest, Ascent) {
- Font cf(L"Arial", 16);
+ Font cf(ASCIIToUTF16("Arial"), 16);
ASSERT_GT(cf.GetBaseline(), 2);
ASSERT_LE(cf.GetBaseline(), 22);
}
TEST_F(FontTest, Height) {
- Font cf(L"Arial", 16);
+ Font cf(ASCIIToUTF16("Arial"), 16);
ASSERT_GE(cf.GetHeight(), 16);
// TODO(akalin): Figure out why height is so large on Linux.
ASSERT_LE(cf.GetHeight(), 26);
}
TEST_F(FontTest, AvgWidths) {
- Font cf(L"Arial", 16);
+ Font cf(ASCIIToUTF16("Arial"), 16);
ASSERT_EQ(cf.GetExpectedTextWidth(0), 0);
ASSERT_GT(cf.GetExpectedTextWidth(1), cf.GetExpectedTextWidth(0));
ASSERT_GT(cf.GetExpectedTextWidth(2), cf.GetExpectedTextWidth(1));
@@ -82,7 +82,7 @@ TEST_F(FontTest, AvgWidths) {
}
TEST_F(FontTest, Widths) {
- Font cf(L"Arial", 16);
+ Font cf(ASCIIToUTF16("Arial"), 16);
ASSERT_EQ(cf.GetStringWidth(ASCIIToUTF16("")), 0);
ASSERT_GT(cf.GetStringWidth(ASCIIToUTF16("a")),
cf.GetStringWidth(ASCIIToUTF16("")));