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

Side by Side Diff: third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.cpp

Issue 2878363003: Revert of Fix ImageAnimation constant names after Blink renaming (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/image-decoders/ImageDecoderTestHelpers.h" 5 #include "platform/image-decoders/ImageDecoderTestHelpers.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include "platform/SharedBuffer.h" 8 #include "platform/SharedBuffer.h"
9 #include "platform/image-decoders/ImageFrame.h" 9 #include "platform/image-decoders/ImageFrame.h"
10 #include "platform/testing/UnitTestHelpers.h" 10 #include "platform/testing/UnitTestHelpers.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 const char* source = data->Data(); 228 const char* source = data->Data();
229 for (size_t length = 1; length <= frame_offset; ++length) { 229 for (size_t length = 1; length <= frame_offset; ++length) {
230 temp_data->Append(source++, 1u); 230 temp_data->Append(source++, 1u);
231 decoder->SetData(temp_data.Get(), false); 231 decoder->SetData(temp_data.Get(), false);
232 232
233 if (length < frame_offset) { 233 if (length < frame_offset) {
234 EXPECT_FALSE(decoder->IsSizeAvailable()); 234 EXPECT_FALSE(decoder->IsSizeAvailable());
235 EXPECT_TRUE(decoder->Size().IsEmpty()); 235 EXPECT_TRUE(decoder->Size().IsEmpty());
236 EXPECT_FALSE(decoder->HasEmbeddedColorSpace()); 236 EXPECT_FALSE(decoder->HasEmbeddedColorSpace());
237 EXPECT_EQ(0u, decoder->FrameCount()); 237 EXPECT_EQ(0u, decoder->FrameCount());
238 EXPECT_EQ(kAnimationLoopOnce, decoder->RepetitionCount()); 238 EXPECT_EQ(kCAnimationLoopOnce, decoder->RepetitionCount());
239 EXPECT_FALSE(decoder->FrameBufferAtIndex(0)); 239 EXPECT_FALSE(decoder->FrameBufferAtIndex(0));
240 } else { 240 } else {
241 EXPECT_TRUE(decoder->IsSizeAvailable()); 241 EXPECT_TRUE(decoder->IsSizeAvailable());
242 EXPECT_FALSE(decoder->Size().IsEmpty()); 242 EXPECT_FALSE(decoder->Size().IsEmpty());
243 EXPECT_EQ(decoder->HasEmbeddedColorSpace(), has_color_space); 243 EXPECT_EQ(decoder->HasEmbeddedColorSpace(), has_color_space);
244 EXPECT_EQ(1u, decoder->FrameCount()); 244 EXPECT_EQ(1u, decoder->FrameCount());
245 EXPECT_EQ(expected_repetition_count, decoder->RepetitionCount()); 245 EXPECT_EQ(expected_repetition_count, decoder->RepetitionCount());
246 } 246 }
247 247
248 ASSERT_FALSE(decoder->Failed()); 248 ASSERT_FALSE(decoder->Failed());
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 size_t frame_count = decoder_a->FrameCount(); 573 size_t frame_count = decoder_a->FrameCount();
574 ASSERT_EQ(frame_count, decoder_b->FrameCount()); 574 ASSERT_EQ(frame_count, decoder_b->FrameCount());
575 575
576 for (size_t i = 0; i < frame_count; ++i) { 576 for (size_t i = 0; i < frame_count; ++i) {
577 VerifyFramesMatch(file, decoder_a->FrameBufferAtIndex(i), 577 VerifyFramesMatch(file, decoder_a->FrameBufferAtIndex(i),
578 decoder_b->FrameBufferAtIndex(i)); 578 decoder_b->FrameBufferAtIndex(i));
579 } 579 }
580 } 580 }
581 581
582 } // namespace blink 582 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698