| 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) | |
| 163 if (hasColorProfile) | 162 if (hasColorProfile) |
| 164 EXPECT_TRUE(decoder->hasColorProfile()); | 163 EXPECT_TRUE(decoder->hasColorProfile()); |
| 165 else | 164 else |
| 166 EXPECT_FALSE(decoder->hasColorProfile()); | 165 EXPECT_FALSE(decoder->hasColorProfile()); |
| 167 #else | |
| 168 EXPECT_FALSE(decoder->hasColorProfile()); | |
| 169 #endif | |
| 170 EXPECT_EQ(1u, decoder->frameCount()); | 166 EXPECT_EQ(1u, decoder->frameCount()); |
| 171 EXPECT_EQ(expectedRepetitionCount, decoder->repetitionCount()); | 167 EXPECT_EQ(expectedRepetitionCount, decoder->repetitionCount()); |
| 172 } | 168 } |
| 173 | 169 |
| 174 EXPECT_FALSE(decoder->failed()); | 170 EXPECT_FALSE(decoder->failed()); |
| 175 if (decoder->failed()) | 171 if (decoder->failed()) |
| 176 return; | 172 return; |
| 177 } | 173 } |
| 178 } | 174 } |
| 179 | 175 |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 std::unique_ptr<ImageDecoder> decoder = createDecoder(); | 730 std::unique_ptr<ImageDecoder> decoder = createDecoder(); |
| 735 RefPtr<SharedBuffer> data = readFile( | 731 RefPtr<SharedBuffer> data = readFile( |
| 736 "/LayoutTests/fast/images/resources/webp-color-profile-lossy.webp"); | 732 "/LayoutTests/fast/images/resources/webp-color-profile-lossy.webp"); |
| 737 ASSERT_TRUE(data.get()); | 733 ASSERT_TRUE(data.get()); |
| 738 decoder->setData(data.get(), true); | 734 decoder->setData(data.get(), true); |
| 739 EXPECT_EQ(1u, decoder->frameCount()); | 735 EXPECT_EQ(1u, decoder->frameCount()); |
| 740 EXPECT_EQ(cAnimationNone, decoder->repetitionCount()); | 736 EXPECT_EQ(cAnimationNone, decoder->repetitionCount()); |
| 741 } | 737 } |
| 742 | 738 |
| 743 } // namespace blink | 739 } // namespace blink |
| OLD | NEW |