From 59203c63bb777a3bacec32fb8830fba33540e809 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:35:29 +0200 Subject: Adding upstream version 127.0. Signed-off-by: Daniel Baumann --- image/test/crashtests/crashtests.list | 10 ++++---- image/test/fuzzing/TestDecoders.cpp | 2 +- image/test/gtest/Common.h | 6 ++--- image/test/gtest/TestDeinterlacingFilter.cpp | 12 +++------ image/test/gtest/moz.build | 21 +++++++--------- image/test/reftest/generic/1805599-1-ref.html | 2 ++ image/test/reftest/generic/1805599-1.html | 34 ++++++++++++++++++++++++++ image/test/reftest/generic/1805599-1.png | Bin 0 -> 270408 bytes image/test/reftest/generic/1805599-1.svg | 10 ++++++++ image/test/reftest/generic/reftest.list | 1 + 10 files changed, 69 insertions(+), 29 deletions(-) create mode 100644 image/test/reftest/generic/1805599-1-ref.html create mode 100644 image/test/reftest/generic/1805599-1.html create mode 100644 image/test/reftest/generic/1805599-1.png create mode 100644 image/test/reftest/generic/1805599-1.svg (limited to 'image/test') diff --git a/image/test/crashtests/crashtests.list b/image/test/crashtests/crashtests.list index 7e137b1d09..7e5aea7fc5 100644 --- a/image/test/crashtests/crashtests.list +++ b/image/test/crashtests/crashtests.list @@ -12,7 +12,7 @@ skip-if(Android||isDebugBuild||ThreadSanitizer) load 694165-1.xhtml load 732319-1.html load 844403-1.html load 856616.gif -skip-if(wayland&&isDebugBuild) skip-if(ThreadSanitizer) load 944353.jpg # wayland: bug 1857023 +skip-if(ThreadSanitizer) load 944353.jpg load 1205923-1.html # Ensure we handle detecting that an image is animated, then failing to decode # it. (See bug 1210745.) @@ -63,10 +63,10 @@ load truncated-second-frame.png # Bug 863975 load 1509998.gif load 1526717-1.html -skip-if(ThreadSanitizer) pref(widget.windows.window_occlusion_tracking.enabled,false) load 1629490-1.html # Bug 1819154 +skip-if(ThreadSanitizer) load 1629490-1.html -pref(widget.windows.window_occlusion_tracking.enabled,false) HTTP load 1634839-1.html # Bug 1819154 -pref(widget.windows.window_occlusion_tracking.enabled,false) HTTP load 1634839-2.html # Bug 1819154 +HTTP load 1634839-1.html +HTTP load 1634839-2.html pref(image.animated.decode-on-demand.batch-size,1) pref(image.animated.decode-on-demand.threshold-kb,0) HTTP load 1676172-1.html pref(browser.soft_reload.only_force_validate_top_level_document,false) HTTP load 1763581-1.html load 1765871-1.jpg @@ -80,4 +80,4 @@ load 1814774.avif load 1817108.avif load 1848717-1.avif load 1852649.webp -pref(widget.windows.window_occlusion_tracking.enabled,false) HTTP load 1862059-1.html +HTTP load 1862059-1.html diff --git a/image/test/fuzzing/TestDecoders.cpp b/image/test/fuzzing/TestDecoders.cpp index c5c0dcdb27..20bc79330d 100644 --- a/image/test/fuzzing/TestDecoders.cpp +++ b/image/test/fuzzing/TestDecoders.cpp @@ -139,7 +139,7 @@ static int RunDecodeToSurfaceFuzzingJXL(nsCOMPtr inputStream) { int FuzzingInitImage(int* argc, char*** argv) { Preferences::SetBool("image.avif.sequence.enabled", true); - Preferences::SetBool("image.mem.max_legal_imgframe_size_kb", 65536); + Preferences::SetInt("image.mem.max_legal_imgframe_size_kb", 65536); #ifdef MOZ_JXL Preferences::SetBool("image.jxl.enabled", true); #endif diff --git a/image/test/gtest/Common.h b/image/test/gtest/Common.h index bd6ae64a42..1a3792d35c 100644 --- a/image/test/gtest/Common.h +++ b/image/test/gtest/Common.h @@ -59,7 +59,7 @@ struct BGRAColor { } BGRAColor DeviceColor() const { - MOZ_ASSERT(!mPremultiplied); + MOZ_RELEASE_ASSERT(!mPremultiplied); if (msRGB) { gfx::DeviceColor color = gfx::ToDeviceColor( gfx::sRGBColor(float(mRed) / 255.0f, float(mGreen) / 255.0f, @@ -72,8 +72,8 @@ struct BGRAColor { } BGRAColor sRGBColor() const { - MOZ_ASSERT(msRGB); - MOZ_ASSERT(!mPremultiplied); + MOZ_RELEASE_ASSERT(msRGB); + MOZ_RELEASE_ASSERT(!mPremultiplied); return *this; } diff --git a/image/test/gtest/TestDeinterlacingFilter.cpp b/image/test/gtest/TestDeinterlacingFilter.cpp index fc3e6f65bd..d95d4f6954 100644 --- a/image/test/gtest/TestDeinterlacingFilter.cpp +++ b/image/test/gtest/TestDeinterlacingFilter.cpp @@ -186,8 +186,7 @@ TEST_F(ImageDeinterlacingFilter, WritePixelsNonProgressiveOutput51_52) { return AsVariant(BGRAColor::Red().AsPixel()); default: - MOZ_ASSERT_UNREACHABLE("Unexpected row"); - return AsVariant(BGRAColor::Transparent().AsPixel()); + MOZ_CRASH("Unexpected row"); } }); EXPECT_EQ(WriteState::FINISHED, result); @@ -259,8 +258,7 @@ TEST_F(ImageDeinterlacingFilter, WritePixelsOutput20_20) { return AsVariant(BGRAColor::Red().AsPixel()); default: - MOZ_ASSERT_UNREACHABLE("Unexpected row"); - return AsVariant(BGRAColor::Transparent().AsPixel()); + MOZ_CRASH("Unexpected row"); } }); EXPECT_EQ(WriteState::FINISHED, result); @@ -319,8 +317,7 @@ TEST_F(ImageDeinterlacingFilter, WritePixelsOutput7_7) { return AsVariant(BGRAColor::Green().AsPixel()); default: - MOZ_ASSERT_UNREACHABLE("Unexpected row"); - return AsVariant(BGRAColor::Transparent().AsPixel()); + MOZ_CRASH("Unexpected row"); } }); EXPECT_EQ(WriteState::FINISHED, result); @@ -373,8 +370,7 @@ TEST_F(ImageDeinterlacingFilter, WritePixelsOutput3_3) { return AsVariant(BGRAColor::Red().AsPixel()); default: - MOZ_ASSERT_UNREACHABLE("Unexpected row"); - return AsVariant(BGRAColor::Transparent().AsPixel()); + MOZ_CRASH("Unexpected row"); } }); EXPECT_EQ(WriteState::FINISHED, result); diff --git a/image/test/gtest/moz.build b/image/test/gtest/moz.build index 60987b3706..2501e98f60 100644 --- a/image/test/gtest/moz.build +++ b/image/test/gtest/moz.build @@ -12,31 +12,28 @@ UNIFIED_SOURCES = [ "TestAnimationFrameBuffer.cpp", "TestBlendAnimationFilter.cpp", "TestCopyOnWrite.cpp", + "TestDecodersPerf.cpp", + "TestDecodeToSurface.cpp", "TestDeinterlacingFilter.cpp", + "TestDownscalingFilter.cpp", "TestFrameAnimator.cpp", "TestLoader.cpp", + "TestMetadata.cpp", "TestRemoveFrameRectFilter.cpp", + "TestSourceBuffer.cpp", "TestStreamingLexer.cpp", + "TestSurfaceCache.cpp", + "TestSurfacePipeIntegration.cpp", "TestSurfaceSink.cpp", "TestSwizzleFilter.cpp", ] -# skip the test on windows10-aarch64, aarch64 due to 1544961 -if not (CONFIG["OS_TARGET"] == "WINNT" and CONFIG["TARGET_CPU"] == "aarch64"): +# Bug 1894284 - Fails under TSAN +if not CONFIG["MOZ_TSAN"]: UNIFIED_SOURCES += [ "TestDecoders.cpp", - "TestDecodersPerf.cpp", - "TestDecodeToSurface.cpp", - "TestMetadata.cpp", - "TestSourceBuffer.cpp", - "TestSurfaceCache.cpp", ] -UNIFIED_SOURCES += [ - "TestDownscalingFilter.cpp", - "TestSurfacePipeIntegration.cpp", -] - TEST_HARNESS_FILES.gtest += [ "animated-with-extra-image-sub-blocks.gif", "blend.avif", diff --git a/image/test/reftest/generic/1805599-1-ref.html b/image/test/reftest/generic/1805599-1-ref.html new file mode 100644 index 0000000000..7012356619 --- /dev/null +++ b/image/test/reftest/generic/1805599-1-ref.html @@ -0,0 +1,2 @@ + + diff --git a/image/test/reftest/generic/1805599-1.html b/image/test/reftest/generic/1805599-1.html new file mode 100644 index 0000000000..ee5295dab5 --- /dev/null +++ b/image/test/reftest/generic/1805599-1.html @@ -0,0 +1,34 @@ + + + + + + diff --git a/image/test/reftest/generic/1805599-1.png b/image/test/reftest/generic/1805599-1.png new file mode 100644 index 0000000000..a4fc33db03 Binary files /dev/null and b/image/test/reftest/generic/1805599-1.png differ diff --git a/image/test/reftest/generic/1805599-1.svg b/image/test/reftest/generic/1805599-1.svg new file mode 100644 index 0000000000..efc2fa5617 --- /dev/null +++ b/image/test/reftest/generic/1805599-1.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/image/test/reftest/generic/reftest.list b/image/test/reftest/generic/reftest.list index 5190b52a0e..6729286168 100644 --- a/image/test/reftest/generic/reftest.list +++ b/image/test/reftest/generic/reftest.list @@ -4,3 +4,4 @@ skip-if(Android) != moz-icon-1.html about:blank skip-if(Android) != moz-icon-blank-1-ref.html moz-icon-blank-1-antiref.html skip-if(Android) != moz-icon-blank-1-ref.html moz-icon-blank-1-antiref2.html fuzzy-if(cocoaWidget,44-49,335-348) fuzzy-if(winWidget,64-140,45-191) == moz-icon-blank-1-almostref.html moz-icon-blank-1-ref.html +pref(image.testing.decode-sync.enabled,false) == 1805599-1.html 1805599-1-ref.html -- cgit v1.2.3