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

Unified Diff: ui/gfx/font_list_unittest.cc

Issue 2302313002: Configure font font names in GFX unittests (Closed)
Patch Set: Review comments addressed 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..93d610acd0ed3a1c6cc189392ce10468372b4630 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(kSymbolFontName, 16);
+ ASSERT_EQ(base::ToLowerASCII(kSymbolFontName),
+ 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(kSymbolFontName, 18));
FontList font_list = FontList(fonts);
// A smaller upper bound should derive a font list with a smaller height.
« ui/gfx/BUILD.gn ('K') | « ui/gfx/BUILD.gn ('k') | ui/gfx/font_names_testing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698