Bug 1315554 - Part 10. Add large embedded PNG/BMP ICO tests. r=me
☠☠ backed out by 0322d59fdaa3 ☠ ☠
authorAndrew Osmond <aosmond@mozilla.com>
Sat, 22 Jul 2017 00:15:00 -0400
changeset 419095 abc949687bdc774389bdfe12a49f7408373d514f
parent 419094 18614b05270dc639d6cf9266f4293cf854e3a6c5
child 419096 0322d59fdaa300b77452ab61aa18ca733fffe6b8
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1315554
milestone56.0a1
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
Bug 1315554 - Part 10. Add large embedded PNG/BMP ICO tests. r=me
image/test/gtest/Common.cpp
image/test/gtest/Common.h
image/test/gtest/TestDecoders.cpp
image/test/gtest/green-large-bmp.ico
image/test/gtest/green-large-png.ico
image/test/gtest/moz.build
--- a/image/test/gtest/Common.cpp
+++ b/image/test/gtest/Common.cpp
@@ -674,16 +674,28 @@ ImageTestCase DownscaledTransparentICOWi
                        TEST_CASE_IS_TRANSPARENT | TEST_CASE_IGNORE_OUTPUT);
 }
 
 ImageTestCase TruncatedSmallGIFTestCase()
 {
   return ImageTestCase("green-1x1-truncated.gif", "image/gif", IntSize(1, 1));
 }
 
+ImageTestCase LargeICOWithBMPTestCase()
+{
+  return ImageTestCase("green-large-bmp.ico", "image/x-icon", IntSize(256, 256),
+                       TEST_CASE_IS_TRANSPARENT);
+}
+
+ImageTestCase LargeICOWithPNGTestCase()
+{
+  return ImageTestCase("green-large-png.ico", "image/x-icon", IntSize(512, 512),
+                       TEST_CASE_IS_TRANSPARENT);
+}
+
 ImageTestCase GreenMultipleSizesICOTestCase()
 {
   return ImageTestCase("green-multiple-sizes.ico", "image/x-icon",
                        IntSize(256, 256));
 }
 
 } // namespace image
 } // namespace mozilla
--- a/image/test/gtest/Common.h
+++ b/image/test/gtest/Common.h
@@ -409,14 +409,16 @@ ImageTestCase DownscaledGIFTestCase();
 ImageTestCase DownscaledJPGTestCase();
 ImageTestCase DownscaledBMPTestCase();
 ImageTestCase DownscaledICOTestCase();
 ImageTestCase DownscaledIconTestCase();
 ImageTestCase DownscaledTransparentICOWithANDMaskTestCase();
 
 ImageTestCase TruncatedSmallGIFTestCase();
 
+ImageTestCase LargeICOWithBMPTestCase();
+ImageTestCase LargeICOWithPNGTestCase();
 ImageTestCase GreenMultipleSizesICOTestCase();
 
 } // namespace image
 } // namespace mozilla
 
 #endif // mozilla_image_test_gtest_Common_h
--- a/image/test/gtest/TestDecoders.cpp
+++ b/image/test/gtest/TestDecoders.cpp
@@ -668,16 +668,36 @@ TEST_F(ImageDecoders, AnimatedGIFWithExt
   EXPECT_TRUE(bool(result.Surface()));
 }
 
 TEST_F(ImageDecoders, TruncatedSmallGIFSingleChunk)
 {
   CheckDecoderSingleChunk(TruncatedSmallGIFTestCase());
 }
 
+TEST_F(ImageDecoders, LargeICOWithBMPSingleChunk)
+{
+  CheckDecoderSingleChunk(LargeICOWithBMPTestCase());
+}
+
+TEST_F(ImageDecoders, LargeICOWithBMPMultiChunk)
+{
+  CheckDecoderMultiChunk(LargeICOWithBMPTestCase());
+}
+
+TEST_F(ImageDecoders, LargeICOWithPNGSingleChunk)
+{
+  CheckDecoderSingleChunk(LargeICOWithPNGTestCase());
+}
+
+TEST_F(ImageDecoders, LargeICOWithPNGMultiChunk)
+{
+  CheckDecoderMultiChunk(LargeICOWithPNGTestCase());
+}
+
 TEST_F(ImageDecoders, MultipleSizesICOSingleChunk)
 {
   ImageTestCase testCase = GreenMultipleSizesICOTestCase();
 
   // Create an image.
   RefPtr<Image> image =
     ImageFactory::CreateAnonymousImage(nsDependentCString(testCase.mMimeType));
   ASSERT_TRUE(!image->HasError());
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..3962cea29de37892ddda2b7dae390bd2865f784b
GIT binary patch
literal 270398
zc%1FXu?@f=6hlE1F#|Ov`!AS)ewR!T>E1P#leV2&X4dQ(d#^f@tNyCz(+vOs00000
z00000000000000000000000000000000000000000000000000000000000000000
z00000000000000000000000000000000000000000000000000000000000000000
z00000000000000000000000000000000000000000000000000000000000000000
z00000000000000000000000000000000000000000000000000000000000000000
z0000000000000000000000000000000000000000000000002+B1w`YNs=T<k|arz
Ge%}KR#vZr;
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..27b9f43cdd6f48e3f581455d8df10f3dbf0f0d30
GIT binary patch
literal 341
zc${NkU<5)CU}R8Wum>{5fb7lyKX+a(DJ~$B*VDr#h=GBL0fZTufz-KeZaaY#OS+@4
zBLl<6e(pbstU$g(vPY0F14ES>14Ba#1H&(%P{RubhEf9thF1v;3|2E37{m+a><Y92
zO0Wg^gt#*NXZZjBfBxQxK#=W8-tI1p|Cw~}0Xgg?p1!W^57|Y<%{iRswVVVBnR&W6
zhE&{odyo<2+9rkn>+?JuAP&b3YNVThCMTB$ECF&<OI#yLQW8s2t&)pUffR$0fuXss
zfw``cVTh5jm8q$ffrYMtiIsst-x0Z6C>nC}Q!>*kaclTLb6Fb5K2KLamvv4FO#s$r
BOe+8Y
--- a/image/test/gtest/moz.build
+++ b/image/test/gtest/moz.build
@@ -42,16 +42,18 @@ TEST_HARNESS_FILES.gtest += [
     'downscaled.ico',
     'downscaled.icon',
     'downscaled.jpg',
     'downscaled.png',
     'first-frame-green.gif',
     'first-frame-green.png',
     'first-frame-padding.gif',
     'green-1x1-truncated.gif',
+    'green-large-bmp.ico',
+    'green-large-png.ico',
     'green-multiple-sizes.ico',
     'green.bmp',
     'green.gif',
     'green.ico',
     'green.icon',
     'green.jpg',
     'green.png',
     'invalid-truncated-metadata.bmp',