Backed out changeset f10f4b5ce594 (bug 1207830)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Fri, 27 May 2016 09:04:46 +0200
changeset 340283 100c964f5e7589be359b1465a77a7515804f7fc7
parent 340282 919296e383f6802ec3c3d54f9b39e3498c8d5fba
child 340284 40d54fc24c410aeb0b8554756b9eeb711ad2f3c8
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1207830
milestone49.0a1
backs outf10f4b5ce594dd6004b5de023b4e53782ed9c0d5
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset f10f4b5ce594 (bug 1207830)
image/test/gtest/Common.cpp
image/test/gtest/Common.h
image/test/gtest/TestDecoders.cpp
image/test/gtest/moz.build
image/test/gtest/transparent-ico-with-and-mask.ico
--- a/image/test/gtest/Common.cpp
+++ b/image/test/gtest/Common.cpp
@@ -545,20 +545,10 @@ ImageTestCase DownscaledICOTestCase()
 }
 
 ImageTestCase DownscaledIconTestCase()
 {
   return ImageTestCase("downscaled.icon", "image/icon", IntSize(100, 100),
                        IntSize(20, 20), TEST_CASE_IS_TRANSPARENT);
 }
 
-ImageTestCase DownscaledTransparentICOWithANDMaskTestCase()
-{
-  // This test case is an ICO with AND mask transparency. We want to ensure that
-  // we can downscale it without crashing or triggering ASAN failures, but its
-  // content isn't simple to verify, so for now we don't check the output.
-  return ImageTestCase("transparent-ico-with-and-mask.ico", "image/x-icon",
-                       IntSize(32, 32), IntSize(20, 20),
-                       TEST_CASE_IS_TRANSPARENT | TEST_CASE_IGNORE_OUTPUT);
-}
-
 } // namespace image
 } // namespace mozilla
--- a/image/test/gtest/Common.h
+++ b/image/test/gtest/Common.h
@@ -28,17 +28,16 @@ namespace image {
 
 enum TestCaseFlags
 {
   TEST_CASE_DEFAULT_FLAGS   = 0,
   TEST_CASE_IS_FUZZY        = 1 << 0,
   TEST_CASE_HAS_ERROR       = 1 << 1,
   TEST_CASE_IS_TRANSPARENT  = 1 << 2,
   TEST_CASE_IS_ANIMATED     = 1 << 3,
-  TEST_CASE_IGNORE_OUTPUT   = 1 << 4,
 };
 
 struct ImageTestCase
 {
   ImageTestCase(const char* aPath,
                 const char* aMimeType,
                 gfx::IntSize aSize,
                 uint32_t aFlags = TEST_CASE_DEFAULT_FLAGS)
@@ -328,14 +327,13 @@ ImageTestCase RLE4BMPTestCase();
 ImageTestCase RLE8BMPTestCase();
 
 ImageTestCase DownscaledPNGTestCase();
 ImageTestCase DownscaledGIFTestCase();
 ImageTestCase DownscaledJPGTestCase();
 ImageTestCase DownscaledBMPTestCase();
 ImageTestCase DownscaledICOTestCase();
 ImageTestCase DownscaledIconTestCase();
-ImageTestCase DownscaledTransparentICOWithANDMaskTestCase();
 
 } // namespace image
 } // namespace mozilla
 
 #endif // mozilla_image_test_gtest_Common_h
--- a/image/test/gtest/TestDecoders.cpp
+++ b/image/test/gtest/TestDecoders.cpp
@@ -85,20 +85,16 @@ CheckDecoderState(const ImageTestCase& a
 static void
 CheckDecoderResults(const ImageTestCase& aTestCase, Decoder* aDecoder)
 {
   RefPtr<SourceSurface> surface = CheckDecoderState(aTestCase, aDecoder);
   if (!surface) {
     return;
   }
 
-  if (aTestCase.mFlags & TEST_CASE_IGNORE_OUTPUT) {
-    return;
-  }
-
   // Check the output.
   EXPECT_TRUE(IsSolidColor(surface, BGRAColor::Green(),
                            aTestCase.mFlags & TEST_CASE_IS_FUZZY ? 1 : 0));
 }
 
 template <typename Func>
 void WithSingleChunkDecode(const ImageTestCase& aTestCase,
                            const Maybe<IntSize>& aOutputSize,
@@ -205,20 +201,16 @@ CheckDownscaleDuringDecode(const ImageTe
 
   WithSingleChunkDecode(aTestCase, Some(outputSize), [&](Decoder* aDecoder) {
     RefPtr<SourceSurface> surface = CheckDecoderState(aTestCase, aDecoder);
 
     // There are no downscale-during-decode tests that have TEST_CASE_HAS_ERROR
     // set, so we expect to always get a surface here.
     EXPECT_TRUE(surface != nullptr);
 
-    if (aTestCase.mFlags & TEST_CASE_IGNORE_OUTPUT) {
-      return;
-    }
-
     // Check that the downscaled image is correct. Note that we skip rows near
     // the transitions between colors, since the downscaler does not produce a
     // sharp boundary at these points. Even some of the rows we test need a
     // small amount of fuzz; this is just the nature of Lanczos downscaling.
     EXPECT_TRUE(RowsAreSolidColor(surface, 0, 4, BGRAColor::Green(), /* aFuzz = */ 3));
     EXPECT_TRUE(RowsAreSolidColor(surface, 6, 3, BGRAColor::Red(), /* aFuzz = */ 4));
     EXPECT_TRUE(RowsAreSolidColor(surface, 11, 3, BGRAColor::Green(), /* aFuzz = */ 3));
     EXPECT_TRUE(RowsAreSolidColor(surface, 16, 4, BGRAColor::Red(), /* aFuzz = */ 3));
@@ -295,21 +287,16 @@ TEST(ImageDecoders, ICOMultiChunk)
   CheckDecoderMultiChunk(GreenICOTestCase());
 }
 
 TEST(ImageDecoders, ICODownscaleDuringDecode)
 {
   CheckDownscaleDuringDecode(DownscaledICOTestCase());
 }
 
-TEST(ImageDecoders, ICOWithANDMaskDownscaleDuringDecode)
-{
-  CheckDownscaleDuringDecode(DownscaledTransparentICOWithANDMaskTestCase());
-}
-
 TEST(ImageDecoders, IconSingleChunk)
 {
   CheckDecoderSingleChunk(GreenIconTestCase());
 }
 
 TEST(ImageDecoders, IconMultiChunk)
 {
   CheckDecoderMultiChunk(GreenIconTestCase());
--- a/image/test/gtest/moz.build
+++ b/image/test/gtest/moz.build
@@ -44,17 +44,16 @@ TEST_HARNESS_FILES.gtest += [
     'green.gif',
     'green.ico',
     'green.icon',
     'green.jpg',
     'green.png',
     'no-frame-delay.gif',
     'rle4.bmp',
     'rle8.bmp',
-    'transparent-ico-with-and-mask.ico',
     'transparent-if-within-ico.bmp',
     'transparent.gif',
     'transparent.png',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 LOCAL_INCLUDES += [
deleted file mode 100644
index ab0dc4bce1ebb02377bca48dae36775579e2414d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001