Chromium Code Reviews| 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 f89c3967067535c521260ccac86a03eff8b8a5dc..aa9053ef3d7ade13a32e625d9ca89bc1ea4b330e 100644 |
| --- a/ui/gfx/font_render_params_linux_unittest.cc |
| +++ b/ui/gfx/font_render_params_linux_unittest.cc |
| @@ -273,6 +273,25 @@ TEST_F(FontRenderParamsTest, ForceFullHintingWhenAntialiasingIsDisabled) { |
| EXPECT_FALSE(params.subpixel_positioning); |
| } |
| +TEST_F(FontRenderParamsTest, ForceSubpixelPositioning) { |
|
Daniel Erat
2014/08/19 22:32:25
this should only be for OS_CHROMEOS, right?
oshima
2014/08/20 01:41:13
Done.
|
| + // Load a config that disables antialiasing and hinting while requesting |
| + // subpixel rendering. |
| + ASSERT_TRUE(LoadSystemFont("arial.ttf")); |
| + ASSERT_TRUE(LoadConfigDataIntoFontconfig( |
| + temp_dir_.path(), |
| + std::string(kFontconfigFileHeader) + kFontconfigMatchHeader + |
| + CreateFontconfigEditStanza("rgba", "const", "rgb") + |
|
Daniel Erat
2014/08/19 22:32:25
do you need this? it seems to be outside the scope
oshima
2014/08/20 01:41:13
Done.
|
| + kFontconfigMatchFooter + kFontconfigFileFooter)); |
| + SetDeviceScaleFactorForInternalDisplay(1.25f); |
| + // Full hinting should be forced. See the comment in GetFontRenderParams() for |
| + // more information. |
|
Daniel Erat
2014/08/19 22:32:25
this comment seems wrong
oshima
2014/08/20 01:41:13
Done.
|
| + FontRenderParams params = |
| + GetFontRenderParams(FontRenderParamsQuery(false), NULL); |
| + EXPECT_TRUE(params.antialiasing); |
| + EXPECT_TRUE(params.subpixel_positioning); |
| + SetDeviceScaleFactorForInternalDisplay(1.0f); |
|
Daniel Erat
2014/08/19 22:32:25
what's the reason for this? note that the cache ge
oshima
2014/08/20 01:41:13
This is necessary so that other test does not use
|
| +} |
| + |
| TEST_F(FontRenderParamsTest, OnlySetConfiguredValues) { |
| // Configure the LinuxFontDelegate (which queries GtkSettings on desktop |
| // Linux) to request subpixel rendering. |