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

Unified Diff: ui/gfx/render_text_unittest.cc

Issue 79263004: Enables font-related unittests again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed a test breakage on Windows. Created 7 years 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/render_text_unittest.cc
diff --git a/ui/gfx/render_text_unittest.cc b/ui/gfx/render_text_unittest.cc
index ffa19174d28c18fa9a3b70e4a512778253a4d318..5e8661e287361a9c6752141325faee7562a6db76 100644
--- a/ui/gfx/render_text_unittest.cc
+++ b/ui/gfx/render_text_unittest.cc
@@ -8,6 +8,7 @@
#include "base/format_macros.h"
#include "base/memory/scoped_ptr.h"
+#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -1156,11 +1157,12 @@ TEST_F(RenderTextTest, StringSizeEmptyString) {
}
#endif // !defined(OS_MACOSX)
-// Disabled. http://crbug.com/316955
-TEST_F(RenderTextTest, DISABLED_StringSizeRespectsFontListMetrics) {
+TEST_F(RenderTextTest, StringSizeRespectsFontListMetrics) {
// Check that Arial and Symbol have different font metrics.
Font arial_font("Arial", 16);
+ ASSERT_EQ("arial", StringToLowerASCII(arial_font.GetActualFontName()));
Font symbol_font("Symbol", 16);
+ ASSERT_EQ("symbol", StringToLowerASCII(symbol_font.GetActualFontName()));
EXPECT_NE(arial_font.GetHeight(), symbol_font.GetHeight());
EXPECT_NE(arial_font.GetBaseline(), symbol_font.GetBaseline());
// "a" should be rendered with Arial, not with Symbol.
@@ -1213,8 +1215,7 @@ TEST_F(RenderTextTest, SetFont) {
EXPECT_EQ(12, render_text->GetPrimaryFont().GetFontSize());
}
-// Disabled. http://crbug.com/316955
-TEST_F(RenderTextTest, DISABLED_SetFontList) {
+TEST_F(RenderTextTest, SetFontList) {
scoped_ptr<RenderText> render_text(RenderText::CreateInstance());
render_text->SetFontList(FontList("Arial,Symbol, 13px"));
const std::vector<Font>& fonts = render_text->font_list().GetFonts();

Powered by Google App Engine
This is Rietveld 408576698