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

Unified Diff: ui/gfx/font_list_unittest.cc

Issue 79263004: Enables font-related unittests again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced. Created 7 years 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/font.cc ('k') | ui/gfx/font_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/font_list_unittest.cc
diff --git a/ui/gfx/font_list_unittest.cc b/ui/gfx/font_list_unittest.cc
index f263673e166952eb2da5482a26ecc783f560d422..6cbb41fbecda73ecb0e8b51efc395488233a54c9 100644
--- a/ui/gfx/font_list_unittest.cc
+++ b/ui/gfx/font_list_unittest.cc
@@ -9,6 +9,7 @@
#include <vector>
#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -289,10 +290,10 @@ TEST(FontListTest, Fonts_DeriveFontListWithSizeDeltaAndStyle) {
EXPECT_EQ("Sans serif|13|bold", FontToString(derived_fonts[1]));
}
-// Disabled. http://crbug.com/316955
-TEST(FontListTest, DISABLED_Fonts_GetHeight_GetBaseline) {
+TEST(FontListTest, Fonts_GetHeight_GetBaseline) {
// If a font list has only one font, the height and baseline must be the same.
Font font1("Arial", 16);
+ ASSERT_EQ("arial", StringToLowerASCII(font1.GetActualFontNameForTesting()));
FontList font_list1("Arial, 16px");
EXPECT_EQ(font1.GetHeight(), font_list1.GetHeight());
EXPECT_EQ(font1.GetBaseline(), font_list1.GetBaseline());
@@ -300,6 +301,7 @@ TEST(FontListTest, DISABLED_Fonts_GetHeight_GetBaseline) {
// If there are two different fonts, the font list returns the max value
// for ascent and descent.
Font font2("Symbol", 16);
+ ASSERT_EQ("symbol", StringToLowerASCII(font2.GetActualFontNameForTesting()));
EXPECT_NE(font1.GetBaseline(), font2.GetBaseline());
EXPECT_NE(font1.GetHeight() - font1.GetBaseline(),
font2.GetHeight() - font2.GetBaseline());
« no previous file with comments | « ui/gfx/font.cc ('k') | ui/gfx/font_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698