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

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

Issue 1460523002: GIF decoding to Index8, unit tests and misusing unit test as benchmark (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Skia:onGetColorType related implementation. Fix part of Leon's review comments. Created 5 years 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 "config.h" 5 #include "config.h"
6 #include "platform/image-decoders/ImageDecoderTestHelpers.h" 6 #include "platform/image-decoders/ImageDecoderTestHelpers.h"
7 7
8 #include "platform/SharedBuffer.h" 8 #include "platform/SharedBuffer.h"
9 #include "platform/image-decoders/ImageDecoder.h" 9 #include "platform/image-decoders/ImageDecoder.h"
10 #include "platform/image-decoders/ImageFrame.h"
11 #include "public/platform/Platform.h" 10 #include "public/platform/Platform.h"
12 #include "public/platform/WebUnitTestSupport.h" 11 #include "public/platform/WebUnitTestSupport.h"
13 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
14 #include "wtf/OwnPtr.h" 13 #include "wtf/OwnPtr.h"
15 #include "wtf/StringHasher.h" 14 #include "wtf/StringHasher.h"
16 15
17 namespace blink { 16 namespace blink {
18 17
19 PassRefPtr<SharedBuffer> readFile(const char* fileName) 18 PassRefPtr<SharedBuffer> readFile(const char* fileName)
20 { 19 {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // data in a segment, its pointer would no longer be valid. 133 // data in a segment, its pointer would no longer be valid.
135 segmentedData->data(); 134 segmentedData->data();
136 135
137 ImageFrame* frame = decoder->frameBufferAtIndex(0); 136 ImageFrame* frame = decoder->frameBufferAtIndex(0);
138 ASSERT_FALSE(decoder->failed()); 137 ASSERT_FALSE(decoder->failed());
139 EXPECT_EQ(frame->status(), ImageFrame::FrameComplete); 138 EXPECT_EQ(frame->status(), ImageFrame::FrameComplete);
140 EXPECT_EQ(hashBitmap(frame->bitmap()), hash); 139 EXPECT_EQ(hashBitmap(frame->bitmap()), hash);
141 } 140 }
142 141
143 } // namespace blink 142 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698