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

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: Comment #25 processed. Created 4 years, 11 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 "platform/SharedBuffer.h" 7 #include "platform/SharedBuffer.h"
8 #include "platform/image-decoders/ImageDecoder.h" 8 #include "platform/image-decoders/ImageDecoder.h"
9 #include "platform/image-decoders/ImageFrame.h"
10 #include "public/platform/Platform.h" 9 #include "public/platform/Platform.h"
11 #include "public/platform/WebUnitTestSupport.h" 10 #include "public/platform/WebUnitTestSupport.h"
12 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
13 #include "wtf/OwnPtr.h" 12 #include "wtf/OwnPtr.h"
14 #include "wtf/StringHasher.h" 13 #include "wtf/StringHasher.h"
15 14
16 namespace blink { 15 namespace blink {
17 16
18 PassRefPtr<SharedBuffer> readFile(const char* fileName) 17 PassRefPtr<SharedBuffer> readFile(const char* fileName)
19 { 18 {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // data in a segment, its pointer would no longer be valid. 132 // data in a segment, its pointer would no longer be valid.
134 segmentedData->data(); 133 segmentedData->data();
135 134
136 ImageFrame* frame = decoder->frameBufferAtIndex(0); 135 ImageFrame* frame = decoder->frameBufferAtIndex(0);
137 ASSERT_FALSE(decoder->failed()); 136 ASSERT_FALSE(decoder->failed());
138 EXPECT_EQ(frame->status(), ImageFrame::FrameComplete); 137 EXPECT_EQ(frame->status(), ImageFrame::FrameComplete);
139 EXPECT_EQ(hashBitmap(frame->bitmap()), hash); 138 EXPECT_EQ(hashBitmap(frame->bitmap()), hash);
140 } 139 }
141 140
142 } // namespace blink 141 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698