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

Unified Diff: app/gfx/font_unittest.cc

Issue 351024: Fixed font height on OS X. Also added some unittests. (Closed)
Patch Set: Expanded on comment. Created 11 years, 1 month 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 | « app/gfx/font_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/gfx/font_unittest.cc
diff --git a/app/gfx/font_unittest.cc b/app/gfx/font_unittest.cc
index 405c130358033fe27ab36811a406b573a5717d1b..4e866e7a0e003d3f689032469eda46d6c60527f6 100644
--- a/app/gfx/font_unittest.cc
+++ b/app/gfx/font_unittest.cc
@@ -31,11 +31,14 @@ TEST_F(FontTest, LoadArialBold) {
TEST_F(FontTest, Ascent) {
Font cf(Font::CreateFont(L"Arial", 16));
ASSERT_GT(cf.baseline(), 2);
+ ASSERT_LE(cf.baseline(), 22);
}
TEST_F(FontTest, Height) {
Font cf(Font::CreateFont(L"Arial", 16));
- ASSERT_LT(cf.baseline(), 22);
+ ASSERT_GE(cf.height(), 16);
+ // TODO(akalin): Figure out why height is so large on Linux.
+ ASSERT_LE(cf.height(), 26);
}
TEST_F(FontTest, AvgWidths) {
« no previous file with comments | « app/gfx/font_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698