Commit 85fd1d95 authored by pkotwicz's avatar pkotwicz Committed by Commit bot

Disable failing TextEliderTest.* and FontListTest.*

This CL:
- disables the remaining TextEliderTest.* on Android
- disables more failing FontListTest.* on Android

BUG=338784, 489354

Review URL: https://codereview.chromium.org/1145473006

Cr-Commit-Position: refs/heads/master@{#330749}
parent fd24faac
CanvasTest.StringSizeEmptyString CanvasTest.StringSizeEmptyString
CanvasTest.StringWidth CanvasTest.StringWidth
FontListTest.FontDescString_Derive
FontListTest.FontDescString_FromFont
FontListTest.FontDescString_FromFontNamesStyleAndSize
FontListTest.FontDescString_FromFontVector
FontListTest.FontDescString_FromFontWithNonNormalStyle
FontListTest.Fonts_Derive
FontListTest.Fonts_DeriveWithSizeDelta
FontListTest.Fonts_DescStringWithStyleInFlexibleFormat_RoundTrip
FontListTest.Fonts_FontVector_RoundTrip
FontListTest.Fonts_FromDescString
FontListTest.Fonts_FromDescStringInFlexibleFormat
FontListTest.Fonts_FromDescStringWithStyleInFlexibleFormat
FontListTest.Fonts_FromFont
FontListTest.Fonts_FromFontVector
FontListTest.Fonts_FromFontWithNonNormalStyle
FontListTest.Fonts_GetHeight_GetBaseline
FontListTest.Fonts_GetStyle
FontTest.Ascent FontTest.Ascent
FontTest.AvgWidths FontTest.AvgWidths
FontTest.CapHeight FontTest.CapHeight
......
...@@ -73,7 +73,13 @@ TEST(FontListTest, ParseDescription) { ...@@ -73,7 +73,13 @@ TEST(FontListTest, ParseDescription) {
&size_pixels)); &size_pixels));
} }
TEST(FontListTest, Fonts_FromDescString) { // TODO(489354): Enable this on android.
#if defined(OS_ANDROID)
#define MAYBE_Fonts_FromDescString DISABLED_Fonts_FromDescString
#else
#define MAYBE_Fonts_FromDescString Fonts_FromDescString
#endif
TEST(FontListTest, MAYBE_Fonts_FromDescString) {
// Test init from font name size string. // Test init from font name size string.
FontList font_list = FontList("arial, Courier New, 13px"); FontList font_list = FontList("arial, Courier New, 13px");
const std::vector<Font>& fonts = font_list.GetFonts(); const std::vector<Font>& fonts = font_list.GetFonts();
...@@ -82,7 +88,15 @@ TEST(FontListTest, Fonts_FromDescString) { ...@@ -82,7 +88,15 @@ TEST(FontListTest, Fonts_FromDescString) {
EXPECT_EQ("Courier New|13", FontToString(fonts[1])); EXPECT_EQ("Courier New|13", FontToString(fonts[1]));
} }
TEST(FontListTest, Fonts_FromDescStringInFlexibleFormat) { // TODO(489354): Enable this on android.
#if defined(OS_ANDROID)
#define MAYBE_Fonts_FromDescStringInFlexibleFormat \
DISABLED_Fonts_FromDescStringInFlexibleFormat
#else
#define MAYBE_Fonts_FromDescStringInFlexibleFormat \
Fonts_FromDescStringInFlexibleFormat
#endif
TEST(FontListTest, MAYBE_Fonts_FromDescStringInFlexibleFormat) {
// Test init from font name size string with flexible format. // Test init from font name size string with flexible format.
FontList font_list = FontList(" arial , Courier New , 13px"); FontList font_list = FontList(" arial , Courier New , 13px");
const std::vector<Font>& fonts = font_list.GetFonts(); const std::vector<Font>& fonts = font_list.GetFonts();
...@@ -91,7 +105,15 @@ TEST(FontListTest, Fonts_FromDescStringInFlexibleFormat) { ...@@ -91,7 +105,15 @@ TEST(FontListTest, Fonts_FromDescStringInFlexibleFormat) {
EXPECT_EQ("Courier New|13", FontToString(fonts[1])); EXPECT_EQ("Courier New|13", FontToString(fonts[1]));
} }
TEST(FontListTest, Fonts_FromDescStringWithStyleInFlexibleFormat) { // TODO(489354): Enable this on android.
#if defined(OS_ANDROID)
#define MAYBE_Fonts_FromDescStringWithStyleInFlexibleFormat \
DISABLED_Fonts_FromDescStringWithStyleInFlexibleFormat
#else
#define MAYBE_Fonts_FromDescStringWithStyleInFlexibleFormat \
Fonts_FromDescStringWithStyleInFlexibleFormat
#endif
TEST(FontListTest, MAYBE_Fonts_FromDescStringWithStyleInFlexibleFormat) {
// Test init from font name style size string with flexible format. // Test init from font name style size string with flexible format.
FontList font_list = FontList(" arial , Courier New , Bold " FontList font_list = FontList(" arial , Courier New , Bold "
" Italic 13px"); " Italic 13px");
...@@ -101,7 +123,13 @@ TEST(FontListTest, Fonts_FromDescStringWithStyleInFlexibleFormat) { ...@@ -101,7 +123,13 @@ TEST(FontListTest, Fonts_FromDescStringWithStyleInFlexibleFormat) {
EXPECT_EQ("Courier New|13|bold|italic", FontToString(fonts[1])); EXPECT_EQ("Courier New|13|bold|italic", FontToString(fonts[1]));
} }
TEST(FontListTest, Fonts_FromFont) { // TODO(489354): Enable this on android.
#if defined(OS_ANDROID)
#define MAYBE_Fonts_FromFont DISABLED_Fonts_FromFont
#else
#define MAYBE_Fonts_FromFont Fonts_FromFont
#endif
TEST(FontListTest, MAYBE_Fonts_FromFont) {
// Test init from Font. // Test init from Font.
Font font("Arial", 8); Font font("Arial", 8);
FontList font_list = FontList(font); FontList font_list = FontList(font);
...@@ -110,7 +138,14 @@ TEST(FontListTest, Fonts_FromFont) { ...@@ -110,7 +138,14 @@ TEST(FontListTest, Fonts_FromFont) {
EXPECT_EQ("Arial|8", FontToString(fonts[0])); EXPECT_EQ("Arial|8", FontToString(fonts[0]));
} }
TEST(FontListTest, Fonts_FromFontWithNonNormalStyle) { // TODO(489354): Enable this on android.
#if defined(OS_ANDROID)
#define MAYBE_Fonts_FromFontWithNonNormalStyle \
DISABLED_Fonts_FromFontWithNonNormalStyle
#else
#define MAYBE_Fonts_FromFontWithNonNormalStyle Fonts_FromFontWithNonNormalStyle
#endif
TEST(FontListTest, MAYBE_Fonts_FromFontWithNonNormalStyle) {
// Test init from Font with non-normal style. // Test init from Font with non-normal style.
Font font("Arial", 8); Font font("Arial", 8);
FontList font_list = FontList(font.Derive(2, Font::BOLD)); FontList font_list = FontList(font.Derive(2, Font::BOLD));
...@@ -124,7 +159,13 @@ TEST(FontListTest, Fonts_FromFontWithNonNormalStyle) { ...@@ -124,7 +159,13 @@ TEST(FontListTest, Fonts_FromFontWithNonNormalStyle) {
EXPECT_EQ("Arial|6|italic", FontToString(fonts[0])); EXPECT_EQ("Arial|6|italic", FontToString(fonts[0]));
} }
TEST(FontListTest, Fonts_FromFontVector) { // TODO(489354): Enable this on android.
#if defined(OS_ANDROID)
#define MAYBE_Fonts_FromFontVector DISABLED_Fonts_FromFontVector
#else
#define MAYBE_Fonts_FromFontVector Fonts_FromFontVector
#endif
TEST(FontListTest, MAYBE_Fonts_FromFontVector) {
// Test init from Font vector. // Test init from Font vector.
Font font("Arial", 8); Font font("Arial", 8);
Font font_1("Courier New", 10); Font font_1("Courier New", 10);
...@@ -152,7 +193,13 @@ TEST(FontListTest, FontDescString_GetStyle) { ...@@ -152,7 +193,13 @@ TEST(FontListTest, FontDescString_GetStyle) {
EXPECT_EQ(Font::BOLD | Font::ITALIC, font_list.GetFontStyle()); EXPECT_EQ(Font::BOLD | Font::ITALIC, font_list.GetFontStyle());
} }
TEST(FontListTest, Fonts_GetStyle) { // TODO(489354): Enable this on android.
#if defined(OS_ANDROID)
#define MAYBE_Fonts_GetStyle DISABLED_Fonts_GetStyle
#else
#define MAYBE_Fonts_GetStyle Fonts_GetStyle
#endif
TEST(FontListTest, MAYBE_Fonts_GetStyle) {
std::vector<Font> fonts; std::vector<Font> fonts;
fonts.push_back(gfx::Font("Arial", 8)); fonts.push_back(gfx::Font("Arial", 8));
fonts.push_back(gfx::Font("Sans serif", 8)); fonts.push_back(gfx::Font("Sans serif", 8));
...@@ -164,7 +211,13 @@ TEST(FontListTest, Fonts_GetStyle) { ...@@ -164,7 +211,13 @@ TEST(FontListTest, Fonts_GetStyle) {
EXPECT_EQ(Font::ITALIC | Font::BOLD, font_list.GetFontStyle()); EXPECT_EQ(Font::ITALIC | Font::BOLD, font_list.GetFontStyle());
} }
TEST(FontListTest, Fonts_Derive) { // TODO(489354): Enable this on android.
#if defined(OS_ANDROID)
#define MAYBE_Fonts_Derive DISABLED_Fonts_Derive
#else
#define MAYBE_Fonts_Derive Fonts_Derive
#endif
TEST(FontListTest, MAYBE_Fonts_Derive) {
std::vector<Font> fonts; std::vector<Font> fonts;
fonts.push_back(gfx::Font("Arial", 8)); fonts.push_back(gfx::Font("Arial", 8));
fonts.push_back(gfx::Font("Courier New", 8)); fonts.push_back(gfx::Font("Courier New", 8));
...@@ -178,7 +231,13 @@ TEST(FontListTest, Fonts_Derive) { ...@@ -178,7 +231,13 @@ TEST(FontListTest, Fonts_Derive) {
EXPECT_EQ("Courier New|13|bold|underline", FontToString(derived_fonts[1])); EXPECT_EQ("Courier New|13|bold|underline", FontToString(derived_fonts[1]));
} }
TEST(FontListTest, Fonts_DeriveWithSizeDelta) { // TODO(489354): Enable this on android.
#if defined(OS_ANDROID)
#define MAYBE_Fonts_DeriveWithSizeDelta DISABLED_Fonts_DeriveWithSizeDelta
#else
#define MAYBE_Fonts_DeriveWithSizeDelta Fonts_DeriveWithSizeDelta
#endif
TEST(FontListTest, MAYBE_Fonts_DeriveWithSizeDelta) {
std::vector<Font> fonts; std::vector<Font> fonts;
fonts.push_back(gfx::Font("Arial", 18).Derive(0, Font::ITALIC)); fonts.push_back(gfx::Font("Arial", 18).Derive(0, Font::ITALIC));
fonts.push_back(gfx::Font("Courier New", 18).Derive(0, Font::ITALIC)); fonts.push_back(gfx::Font("Courier New", 18).Derive(0, Font::ITALIC));
...@@ -192,7 +251,13 @@ TEST(FontListTest, Fonts_DeriveWithSizeDelta) { ...@@ -192,7 +251,13 @@ TEST(FontListTest, Fonts_DeriveWithSizeDelta) {
EXPECT_EQ("Courier New|13|italic", FontToString(derived_fonts[1])); EXPECT_EQ("Courier New|13|italic", FontToString(derived_fonts[1]));
} }
TEST(FontListTest, Fonts_GetHeight_GetBaseline) { // TODO(489354): Enable this on android.
#if defined(OS_ANDROID)
#define MAYBE_Fonts_GetHeight_GetBaseline DISABLED_Fonts_GetHeight_GetBaseline
#else
#define MAYBE_Fonts_GetHeight_GetBaseline Fonts_GetHeight_GetBaseline
#endif
TEST(FontListTest, MAYBE_Fonts_GetHeight_GetBaseline) {
// If a font list has only one font, the height and baseline must be the same. // If a font list has only one font, the height and baseline must be the same.
Font font1("Arial", 16); Font font1("Arial", 16);
ASSERT_EQ("arial", ASSERT_EQ("arial",
...@@ -222,7 +287,14 @@ TEST(FontListTest, Fonts_GetHeight_GetBaseline) { ...@@ -222,7 +287,14 @@ TEST(FontListTest, Fonts_GetHeight_GetBaseline) {
font_list_mix.GetHeight() - font_list_mix.GetBaseline()); font_list_mix.GetHeight() - font_list_mix.GetBaseline());
} }
TEST(FontListTest, Fonts_DeriveWithHeightUpperBound) { // TODO(489354): Enable this on android.
#if defined(OS_ANDROID)
#define MAYBE_Fonts_DeriveWithHeightUpperBound \
DISABLED_Fonts_DeriveWithHeightUpperBound
#else
#define MAYBE_Fonts_DeriveWithHeightUpperBound Fonts_DeriveWithHeightUpperBound
#endif
TEST(FontListTest, MAYBE_Fonts_DeriveWithHeightUpperBound) {
std::vector<Font> fonts; std::vector<Font> fonts;
fonts.push_back(gfx::Font("Arial", 18)); fonts.push_back(gfx::Font("Arial", 18));
......
...@@ -839,7 +839,13 @@ TEST(TextEliderTest, ElideRectangleTextCheckConcatWidthEqualsSumOfWidths) { ...@@ -839,7 +839,13 @@ TEST(TextEliderTest, ElideRectangleTextCheckConcatWidthEqualsSumOfWidths) {
} }
#endif // OS_CHROMEOS #endif // OS_CHROMEOS
TEST(TextEliderTest, ElideRectangleString) { // TODO(338784): Enable this on android.
#if defined(OS_ANDROID)
#define MAYBE_ElideRectangleString DISABLED_ElideRectangleString
#else
#define MAYBE_ElideRectangleString ElideRectangleString
#endif
TEST(TextEliderTest, MAYBE_ElideRectangleString) {
struct TestData { struct TestData {
const char* input; const char* input;
int max_rows; int max_rows;
...@@ -922,7 +928,14 @@ TEST(TextEliderTest, ElideRectangleString) { ...@@ -922,7 +928,14 @@ TEST(TextEliderTest, ElideRectangleString) {
} }
} }
TEST(TextEliderTest, ElideRectangleStringNotStrict) { // TODO(338784): Enable this on android.
#if defined(OS_ANDROID)
#define MAYBE_ElideRectangleStringNotStrict \
DISABLED_ElideRectangleStringNotStrict
#else
#define MAYBE_ElideRectangleStringNotStrict ElideRectangleStringNotStrict
#endif
TEST(TextEliderTest, MAYBE_ElideRectangleStringNotStrict) {
struct TestData { struct TestData {
const char* input; const char* input;
int max_rows; int max_rows;
...@@ -1004,7 +1017,13 @@ TEST(TextEliderTest, ElideRectangleStringNotStrict) { ...@@ -1004,7 +1017,13 @@ TEST(TextEliderTest, ElideRectangleStringNotStrict) {
} }
} }
TEST(TextEliderTest, ElideRectangleWide16) { // TODO(338784): Enable this on android.
#if defined(OS_ANDROID)
#define MAYBE_ElideRectangleWide16 DISABLED_ElideRectangleWide16
#else
#define MAYBE_ElideRectangleWide16 ElideRectangleWide16
#endif
TEST(TextEliderTest, MAYBE_ElideRectangleWide16) {
// Two greek words separated by space. // Two greek words separated by space.
const base::string16 str(WideToUTF16( const base::string16 str(WideToUTF16(
L"\x03a0\x03b1\x03b3\x03ba\x03cc\x03c3\x03bc\x03b9" L"\x03a0\x03b1\x03b3\x03ba\x03cc\x03c3\x03bc\x03b9"
...@@ -1023,7 +1042,13 @@ TEST(TextEliderTest, ElideRectangleWide16) { ...@@ -1023,7 +1042,13 @@ TEST(TextEliderTest, ElideRectangleWide16) {
EXPECT_EQ(out2, output); EXPECT_EQ(out2, output);
} }
TEST(TextEliderTest, ElideRectangleWide32) { // TODO(338784): Enable this on android.
#if defined(OS_ANDROID)
#define MAYBE_ElideRectangleWide32 DISABLED_ElideRectangleWide32
#else
#define MAYBE_ElideRectangleWide32 ElideRectangleWide32
#endif
TEST(TextEliderTest, MAYBE_ElideRectangleWide32) {
// Four U+1D49C MATHEMATICAL SCRIPT CAPITAL A followed by space "aaaaa". // Four U+1D49C MATHEMATICAL SCRIPT CAPITAL A followed by space "aaaaa".
const base::string16 str(UTF8ToUTF16( const base::string16 str(UTF8ToUTF16(
"\xF0\x9D\x92\x9C\xF0\x9D\x92\x9C\xF0\x9D\x92\x9C\xF0\x9D\x92\x9C" "\xF0\x9D\x92\x9C\xF0\x9D\x92\x9C\xF0\x9D\x92\x9C\xF0\x9D\x92\x9C"
...@@ -1036,7 +1061,13 @@ TEST(TextEliderTest, ElideRectangleWide32) { ...@@ -1036,7 +1061,13 @@ TEST(TextEliderTest, ElideRectangleWide32) {
EXPECT_EQ(out, output); EXPECT_EQ(out, output);
} }
TEST(TextEliderTest, TruncateString) { // TODO(338784): Enable this on android.
#if defined(OS_ANDROID)
#define MAYBE_TruncateString DISABLED_TruncateString
#else
#define MAYBE_TruncateString TruncateString
#endif
TEST(TextEliderTest, MAYBE_TruncateString) {
base::string16 string = ASCIIToUTF16("foooooey bxxxar baz"); base::string16 string = ASCIIToUTF16("foooooey bxxxar baz");
// Tests that apply to both break behaviors: // Tests that apply to both break behaviors:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment