Index: ui/gfx/font_render_params_linux_unittest.cc |
diff --git a/ui/gfx/font_render_params_linux_unittest.cc b/ui/gfx/font_render_params_linux_unittest.cc |
index 46a4fcfaac27f036693448205271b265cc92db1e..45c1b99a125bc71058d2689c30e8fb71c983f94e 100644 |
--- a/ui/gfx/font_render_params_linux_unittest.cc |
+++ b/ui/gfx/font_render_params_linux_unittest.cc |
@@ -96,8 +96,11 @@ TEST_F(FontRenderParamsTest, Default) { |
CreateFontconfigEditStanza("hintstyle", "const", "hintslight") + |
CreateFontconfigEditStanza("rgba", "const", "rgb") + |
kFontconfigMatchFooter + |
- // Add a font match for Arial; it shouldn't be used when querying for |
- // default settings: http://crbug.com/421247 |
+ // Add a font match for Arial; it shouldn't be used on Chrome OS but when |
+ // querying for default settings: http://crbug.com/421247 |
+ // |
+ // The match _should_ take affect on desktop Linux, though: |
msw
2014/12/17 22:42:23
nit: "take effect"
Daniel Erat
2014/12/18 00:15:46
oh my, that's embarrassing. i know the difference
|
+ // http://crbug.com/442443 |
kFontconfigMatchFontHeader + |
CreateFontconfigTestStanza("family", "eq", "string", "Arial") + |
CreateFontconfigEditStanza("antialias", "bool", "true") + |
@@ -110,9 +113,14 @@ TEST_F(FontRenderParamsTest, Default) { |
FontRenderParams params = GetFontRenderParams( |
FontRenderParamsQuery(true), NULL); |
EXPECT_TRUE(params.antialiasing); |
- EXPECT_TRUE(params.autohinter); |
EXPECT_TRUE(params.use_bitmaps); |
+#if defined(OS_CHROMEOS) |
+ EXPECT_TRUE(params.autohinter); |
EXPECT_EQ(FontRenderParams::HINTING_SLIGHT, params.hinting); |
+#else |
+ EXPECT_FALSE(params.autohinter); |
+ EXPECT_EQ(FontRenderParams::HINTING_FULL, params.hinting); |
+#endif |
EXPECT_FALSE(params.subpixel_positioning); |
EXPECT_EQ(FontRenderParams::SUBPIXEL_RENDERING_RGB, |
params.subpixel_rendering); |
@@ -256,11 +264,19 @@ TEST_F(FontRenderParamsTest, UseBitmaps) { |
} |
TEST_F(FontRenderParamsTest, ForceFullHintingWhenAntialiasingIsDisabled) { |
+#if !defined(OS_CHROMEOS) |
+ ASSERT_TRUE(LoadSystemFont("arial.ttf")); |
+#endif |
// Load a config that disables antialiasing and hinting while requesting |
// subpixel rendering. |
ASSERT_TRUE(LoadConfigDataIntoFontconfig(temp_dir_.path(), |
std::string(kFontconfigFileHeader) + |
+#if defined(OS_CHROMEOS) |
kFontconfigMatchPatternHeader + |
+#else |
+ // Desktop Linux performs a match instead of using the default pattern. |
msw
2014/12/17 22:42:23
Shouldn't Linux fall back on the default pattern i
Daniel Erat
2014/12/18 00:15:46
that's what i was thinking at first, but i saw fai
|
+ kFontconfigMatchFontHeader + |
+#endif |
CreateFontconfigEditStanza("antialias", "bool", "false") + |
CreateFontconfigEditStanza("hinting", "bool", "false") + |
CreateFontconfigEditStanza("hintstyle", "const", "hintnone") + |