Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Unified Diff: third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp

Issue 2454123002: Refactor image decoders to use 'colorSpace' instead of 'colorProfile' (Closed)
Patch Set: Fix legacy ImageFrame Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp
index 3a900fd7847dbbdaa4655d85a0a335f649e62122..878d2f47d4adfbead25ace8ca333b9cb29a292ac 100644
--- a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoderTest.cpp
@@ -47,9 +47,9 @@ namespace {
std::unique_ptr<ImageDecoder> createDecoder(
ImageDecoder::AlphaOption alphaOption) {
- return wrapUnique(new WEBPImageDecoder(
- alphaOption, ImageDecoder::GammaAndColorProfileApplied,
- ImageDecoder::noDecodedImageByteLimit));
+ return wrapUnique(
+ new WEBPImageDecoder(alphaOption, ImageDecoder::ColorSpaceApplied,
+ ImageDecoder::noDecodedImageByteLimit));
}
std::unique_ptr<ImageDecoder> createDecoder() {
@@ -135,7 +135,7 @@ void testDecodeAfterReallocatingData(const char* webpFile) {
void testByteByByteSizeAvailable(const char* webpFile,
size_t frameOffset,
- bool hasColorProfile,
+ bool hasColorSpace,
int expectedRepetitionCount) {
std::unique_ptr<ImageDecoder> decoder = createDecoder();
RefPtr<SharedBuffer> data = readFile(webpFile);
@@ -152,17 +152,14 @@ void testByteByByteSizeAvailable(const char* webpFile,
if (length < frameOffset) {
EXPECT_FALSE(decoder->isSizeAvailable());
EXPECT_TRUE(decoder->size().isEmpty());
- EXPECT_FALSE(decoder->hasColorProfile());
+ EXPECT_FALSE(decoder->hasColorSpace());
EXPECT_EQ(0u, decoder->frameCount());
EXPECT_EQ(cAnimationLoopOnce, decoder->repetitionCount());
EXPECT_FALSE(decoder->frameBufferAtIndex(0));
} else {
EXPECT_TRUE(decoder->isSizeAvailable());
EXPECT_FALSE(decoder->size().isEmpty());
- if (hasColorProfile)
- EXPECT_TRUE(decoder->hasColorProfile());
- else
- EXPECT_FALSE(decoder->hasColorProfile());
+ EXPECT_EQ(decoder->hasColorSpace(), hasColorSpace);
EXPECT_EQ(1u, decoder->frameCount());
EXPECT_EQ(expectedRepetitionCount, decoder->repetitionCount());
}

Powered by Google App Engine
This is Rietveld 408576698