summaryrefslogtreecommitdiffstats
path: root/image/test/gtest
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /image/test/gtest
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'image/test/gtest')
-rw-r--r--image/test/gtest/Common.h6
-rw-r--r--image/test/gtest/TestDeinterlacingFilter.cpp12
-rw-r--r--image/test/gtest/moz.build21
3 files changed, 16 insertions, 23 deletions
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",