Index: ui/gfx/canvas_unittest.cc |
diff --git a/ui/gfx/canvas_unittest.cc b/ui/gfx/canvas_unittest.cc |
index 21b9f51e57e8eee4e12e16d4390d83b4c5cbde64..7b0dc30cbb021e60390f91f35c989f1509f15520 100644 |
--- a/ui/gfx/canvas_unittest.cc |
+++ b/ui/gfx/canvas_unittest.cc |
@@ -17,13 +17,13 @@ class CanvasTest : public testing::Test { |
return Canvas::GetStringWidth(UTF8ToUTF16(text), font_); |
} |
- gfx::Size SizeStringInt(const char *text, int width, int line_height) { |
+ gfx::SizeF SizeStringInt(const char *text, float width, int line_height) { |
base::string16 text16 = UTF8ToUTF16(text); |
- int height = 0; |
+ float height = 0; |
int flags = |
(text16.find('\n') != base::string16::npos) ? Canvas::MULTI_LINE : 0; |
Canvas::SizeStringInt(text16, font_, &width, &height, line_height, flags); |
- return gfx::Size(width, height); |
+ return gfx::SizeF(width, height); |
} |
private: |
@@ -39,7 +39,7 @@ TEST_F(CanvasTest, StringWidthEmptyString) { |
} |
TEST_F(CanvasTest, StringSizeEmptyString) { |
- gfx::Size size = SizeStringInt("", 0, 0); |
+ gfx::SizeF size = SizeStringInt("", 0, 0); |
EXPECT_EQ(0, size.width()); |
EXPECT_GT(size.height(), 0); |
} |
@@ -52,8 +52,8 @@ TEST_F(CanvasTest, StringSizeEmptyString) { |
#endif |
TEST_F(CanvasTest, MAYBE_StringSizeWithLineHeight) { |
- gfx::Size one_line_size = SizeStringInt("Q", 0, 0); |
- gfx::Size four_line_size = SizeStringInt("Q\nQ\nQ\nQ", 1000000, 1000); |
+ gfx::SizeF one_line_size = SizeStringInt("Q", 0, 0); |
+ gfx::SizeF four_line_size = SizeStringInt("Q\nQ\nQ\nQ", 1000000, 1000); |
EXPECT_EQ(one_line_size.width(), four_line_size.width()); |
EXPECT_EQ(3 * 1000 + one_line_size.height(), four_line_size.height()); |
} |