summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authoryukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-27 20:44:12 +0000
committeryukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-27 20:44:12 +0000
commit85eb3e19a686b43dd9afe2e307ab36d5c410ff1e (patch)
treee92ddca85337021e2f61fb6f391fb8cbe5f227ed /ui
parenta4f56a0e5ad11fa145d7590dce2e31942fedd6fb (diff)
downloadchromium_src-85eb3e19a686b43dd9afe2e307ab36d5c410ff1e.zip
chromium_src-85eb3e19a686b43dd9afe2e307ab36d5c410ff1e.tar.gz
chromium_src-85eb3e19a686b43dd9afe2e307ab36d5c410ff1e.tar.bz2
Makes it clear in unittests that the system is missing some of fonts.
Added some error messages to FontTest.GetActualFontNameForTesting. BUG=347429 TEST=Run ui_unittests. Review URL: https://codereview.chromium.org/182873002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253920 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/gfx/font_unittest.cc16
1 files changed, 14 insertions, 2 deletions
diff --git a/ui/gfx/font_unittest.cc b/ui/gfx/font_unittest.cc
index 9188735..da4bdfc 100644
--- a/ui/gfx/font_unittest.cc
+++ b/ui/gfx/font_unittest.cc
@@ -109,11 +109,23 @@ TEST_F(FontTest, AvgWidths) {
#if !defined(OS_WIN)
// On Windows, Font::GetActualFontNameForTesting() doesn't work well for now.
// http://crbug.com/327287
+//
+// Check that fonts used for testing are installed and enabled. On Mac
+// fonts may be installed but still need enabling in Font Book.app.
+// http://crbug.com/347429
TEST_F(FontTest, GetActualFontNameForTesting) {
Font arial("Arial", 16);
- EXPECT_EQ("arial", StringToLowerASCII(arial.GetActualFontNameForTesting()));
+ EXPECT_EQ("arial", StringToLowerASCII(arial.GetActualFontNameForTesting()))
+ << "********\n"
+ << "Your test environment seems to be missing Arial font, which is "
+ << "needed for unittests. Check if Arial font is installed.\n"
+ << "********";
Font symbol("Symbol", 16);
- EXPECT_EQ("symbol", StringToLowerASCII(symbol.GetActualFontNameForTesting()));
+ EXPECT_EQ("symbol", StringToLowerASCII(symbol.GetActualFontNameForTesting()))
+ << "********\n"
+ << "Your test environment seems to be missing Symbol font, which is "
+ << "needed for unittests. Check if Symbol font is installed.\n"
+ << "********";
const char* const invalid_font_name = "no_such_font_name";
Font fallback_font(invalid_font_name, 16);