OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 if (length < frameOffset) { | 152 if (length < frameOffset) { |
153 EXPECT_FALSE(decoder->isSizeAvailable()); | 153 EXPECT_FALSE(decoder->isSizeAvailable()); |
154 EXPECT_TRUE(decoder->size().isEmpty()); | 154 EXPECT_TRUE(decoder->size().isEmpty()); |
155 EXPECT_FALSE(decoder->hasColorProfile()); | 155 EXPECT_FALSE(decoder->hasColorProfile()); |
156 EXPECT_EQ(0u, decoder->frameCount()); | 156 EXPECT_EQ(0u, decoder->frameCount()); |
157 EXPECT_EQ(cAnimationLoopOnce, decoder->repetitionCount()); | 157 EXPECT_EQ(cAnimationLoopOnce, decoder->repetitionCount()); |
158 EXPECT_FALSE(decoder->frameBufferAtIndex(0)); | 158 EXPECT_FALSE(decoder->frameBufferAtIndex(0)); |
159 } else { | 159 } else { |
160 EXPECT_TRUE(decoder->isSizeAvailable()); | 160 EXPECT_TRUE(decoder->isSizeAvailable()); |
161 EXPECT_FALSE(decoder->size().isEmpty()); | 161 EXPECT_FALSE(decoder->size().isEmpty()); |
162 #if USE(QCMSLIB) | 162 #if USE(SKCOLORXFORM) |
163 if (hasColorProfile) | 163 if (hasColorProfile) |
164 EXPECT_TRUE(decoder->hasColorProfile()); | 164 EXPECT_TRUE(decoder->hasColorProfile()); |
165 else | 165 else |
166 EXPECT_FALSE(decoder->hasColorProfile()); | 166 EXPECT_FALSE(decoder->hasColorProfile()); |
167 #else | 167 #else |
168 EXPECT_FALSE(decoder->hasColorProfile()); | 168 EXPECT_FALSE(decoder->hasColorProfile()); |
169 #endif | 169 #endif |
170 EXPECT_EQ(1u, decoder->frameCount()); | 170 EXPECT_EQ(1u, decoder->frameCount()); |
171 EXPECT_EQ(expectedRepetitionCount, decoder->repetitionCount()); | 171 EXPECT_EQ(expectedRepetitionCount, decoder->repetitionCount()); |
172 } | 172 } |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 std::unique_ptr<ImageDecoder> decoder = createDecoder(); | 734 std::unique_ptr<ImageDecoder> decoder = createDecoder(); |
735 RefPtr<SharedBuffer> data = readFile( | 735 RefPtr<SharedBuffer> data = readFile( |
736 "/LayoutTests/fast/images/resources/webp-color-profile-lossy.webp"); | 736 "/LayoutTests/fast/images/resources/webp-color-profile-lossy.webp"); |
737 ASSERT_TRUE(data.get()); | 737 ASSERT_TRUE(data.get()); |
738 decoder->setData(data.get(), true); | 738 decoder->setData(data.get(), true); |
739 EXPECT_EQ(1u, decoder->frameCount()); | 739 EXPECT_EQ(1u, decoder->frameCount()); |
740 EXPECT_EQ(cAnimationNone, decoder->repetitionCount()); | 740 EXPECT_EQ(cAnimationNone, decoder->repetitionCount()); |
741 } | 741 } |
742 | 742 |
743 } // namespace blink | 743 } // namespace blink |
OLD | NEW |