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

Unified Diff: ui/gfx/render_text_unittest.cc

Issue 10591003: Expose GetBaseline() method on RenderText. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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/render_text_linux.cc ('k') | ui/gfx/render_text_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_unittest.cc
===================================================================
--- ui/gfx/render_text_unittest.cc (revision 143588)
+++ ui/gfx/render_text_unittest.cc (working copy)
@@ -1017,6 +1017,13 @@
}
}
+TEST_F(RenderTextTest, GetBaselineSanity) {
+ scoped_ptr<RenderText> render_text(RenderText::CreateRenderText());
+ render_text->SetText(UTF8ToUTF16("Hello World"));
+ const int baseline = render_text->GetBaseline();
+ EXPECT_GT(baseline, 0);
+}
+
TEST_F(RenderTextTest, CursorBoundsInReplacementMode) {
scoped_ptr<RenderText> render_text(RenderText::CreateRenderText());
render_text->SetText(ASCIIToUTF16("abcdefg"));
« no previous file with comments | « ui/gfx/render_text_linux.cc ('k') | ui/gfx/render_text_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698