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

Unified Diff: ui/gfx/font_list_unittest.cc

Issue 2302313002: Configure font font names in GFX unittests (Closed)
Patch Set: Change to OpenSymbol and make test more robust Created 4 years, 3 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
Index: ui/gfx/font_list_unittest.cc
diff --git a/ui/gfx/font_list_unittest.cc b/ui/gfx/font_list_unittest.cc
index 42b27847eeecc90946d1aa55b0fafa209c01e113..24d383589136c8373f206b9ed1d68c7137f5d574 100644
--- a/ui/gfx/font_list_unittest.cc
+++ b/ui/gfx/font_list_unittest.cc
@@ -12,6 +12,7 @@
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/gfx/font_names_testing.h"
namespace gfx {
@@ -306,8 +307,9 @@ TEST(FontListTest, MAYBE_Fonts_GetHeight_GetBaseline) {
// If there are two different fonts, the font list returns the max value
// for the baseline (ascent) and height.
- Font font2("Symbol", 16);
- ASSERT_EQ("symbol", base::ToLowerASCII(font2.GetActualFontNameForTesting()));
+ Font font2(symbol_font_name, 16);
+ ASSERT_EQ(base::ToLowerASCII(symbol_font_name),
+ base::ToLowerASCII(font2.GetActualFontNameForTesting()));
EXPECT_NE(font1.GetBaseline(), font2.GetBaseline());
// TODO(ananta): Find a size and font pair with reliably distinct descents.
EXPECT_NE(font1.GetHeight(), font2.GetHeight());
@@ -336,7 +338,7 @@ TEST(FontListTest, MAYBE_Fonts_DeriveWithHeightUpperBound) {
fonts.push_back(Font("Arial", 18));
fonts.push_back(Font("Sans serif", 18));
- fonts.push_back(Font("Symbol", 18));
+ fonts.push_back(Font(symbol_font_name, 18));
FontList font_list = FontList(fonts);
// A smaller upper bound should derive a font list with a smaller height.
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/font_names_testing.h » ('j') | ui/gfx/font_names_testing.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698