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

Unified Diff: ui/gfx/font_list_unittest.cc

Issue 1145473006: Disable failing TextEliderTest.* and FontListTest.* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « build/android/pylib/gtest/filter/gfx_unittests_disabled ('k') | ui/gfx/text_elider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/font_list_unittest.cc
diff --git a/ui/gfx/font_list_unittest.cc b/ui/gfx/font_list_unittest.cc
index f3e8ee7031a1a0f56b693fa75b435eca49be30d9..92f47592d4f352d4507d483db1c4f0b25001ad31 100644
--- a/ui/gfx/font_list_unittest.cc
+++ b/ui/gfx/font_list_unittest.cc
@@ -14,6 +14,7 @@
namespace {
+#if !defined(OS_ANDROID)
// Helper function for comparing fonts for equality.
std::string FontToString(const gfx::Font& font) {
std::string font_string = font.GetFontName();
@@ -28,6 +29,7 @@ std::string FontToString(const gfx::Font& font) {
font_string += "|underline";
return font_string;
}
+#endif
} // namespace
@@ -73,6 +75,22 @@ TEST(FontListTest, ParseDescription) {
&size_pixels));
}
+TEST(FontListTest, FontDescString_GetStyle) {
+ FontList font_list = FontList("Arial,Sans serif, 8px");
+ EXPECT_EQ(Font::NORMAL, font_list.GetFontStyle());
+
+ font_list = FontList("Arial,Sans serif,Bold 8px");
+ EXPECT_EQ(Font::BOLD, font_list.GetFontStyle());
+
+ font_list = FontList("Arial,Sans serif,Italic 8px");
+ EXPECT_EQ(Font::ITALIC, font_list.GetFontStyle());
+
+ font_list = FontList("Arial,Italic Bold 8px");
+ EXPECT_EQ(Font::BOLD | Font::ITALIC, font_list.GetFontStyle());
+}
+
+// TODO(489354): Enable tests on Android
+#if !defined(OS_ANDROID)
jbudorick 2015/05/18 19:17:56 I think this should be done via the MAYBE_FooTest
pkotwicz 2015/05/18 20:59:05 Done.
TEST(FontListTest, Fonts_FromDescString) {
// Test init from font name size string.
FontList font_list = FontList("arial, Courier New, 13px");
@@ -138,20 +156,6 @@ TEST(FontListTest, Fonts_FromFontVector) {
EXPECT_EQ("Courier New|8|bold", FontToString(fonts[1]));
}
-TEST(FontListTest, FontDescString_GetStyle) {
- FontList font_list = FontList("Arial,Sans serif, 8px");
- EXPECT_EQ(Font::NORMAL, font_list.GetFontStyle());
-
- font_list = FontList("Arial,Sans serif,Bold 8px");
- EXPECT_EQ(Font::BOLD, font_list.GetFontStyle());
-
- font_list = FontList("Arial,Sans serif,Italic 8px");
- EXPECT_EQ(Font::ITALIC, font_list.GetFontStyle());
-
- font_list = FontList("Arial,Italic Bold 8px");
- EXPECT_EQ(Font::BOLD | Font::ITALIC, font_list.GetFontStyle());
-}
-
TEST(FontListTest, Fonts_GetStyle) {
std::vector<Font> fonts;
fonts.push_back(gfx::Font("Arial", 8));
@@ -245,4 +249,6 @@ TEST(FontListTest, Fonts_DeriveWithHeightUpperBound) {
EXPECT_EQ(font_list.GetFontSize(), derived_2.GetFontSize());
}
+#endif // !defined(OS_ANDROID)
+
} // namespace gfx
« no previous file with comments | « build/android/pylib/gtest/filter/gfx_unittests_disabled ('k') | ui/gfx/text_elider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698