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

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

Issue 2490473005: Pull up equivalent image decoding tests (Closed)
Patch Set: Separate API for file and dir + file Created 4 years, 1 month 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 "wtf/Vector.h" 5 #include "wtf/Vector.h"
6 #include <memory> 6 #include <memory>
7 7
8 class SkBitmap; 8 class SkBitmap;
9 9
10 namespace blink { 10 namespace blink {
11 class ImageDecoder; 11 class ImageDecoder;
12 class SharedBuffer; 12 class SharedBuffer;
13 13
14 const char decodersTestingDir[] = "Source/platform/image-decoders/testing"; 14 const char decodersTestingDir[] = "Source/platform/image-decoders/testing";
15 15
16 using DecoderCreator = std::unique_ptr<ImageDecoder> (*)(); 16 using DecoderCreator = std::unique_ptr<ImageDecoder> (*)();
17 PassRefPtr<SharedBuffer> readFile(const char* fileName); 17 PassRefPtr<SharedBuffer> readFile(const char* fileName);
18 PassRefPtr<SharedBuffer> readFile(const char* dir, const char* fileName); 18 PassRefPtr<SharedBuffer> readFile(const char* dir, const char* fileName);
19 unsigned hashBitmap(const SkBitmap&); 19 unsigned hashBitmap(const SkBitmap&);
20 void createDecodingBaseline(DecoderCreator, 20 void createDecodingBaseline(DecoderCreator,
21 SharedBuffer*, 21 SharedBuffer*,
22 Vector<unsigned>* baselineHashes); 22 Vector<unsigned>* baselineHashes);
23
23 void testByteByByteDecode(DecoderCreator createDecoder, 24 void testByteByByteDecode(DecoderCreator createDecoder,
24 const char* file, 25 const char* file,
25 size_t expectedFrameCount, 26 size_t expectedFrameCount,
26 int expectedRepetitionCount); 27 int expectedRepetitionCount);
28 void testByteByByteDecode(DecoderCreator createDecoder,
29 const char* dir,
30 const char* file,
31 size_t expectedFrameCount,
32 int expectedRepetitionCount);
33
27 void testMergeBuffer(DecoderCreator createDecoder, const char* file); 34 void testMergeBuffer(DecoderCreator createDecoder, const char* file);
35 void testMergeBuffer(DecoderCreator createDecoder,
36 const char* dir,
37 const char* file);
38
39 void testRandomFrameDecode(DecoderCreator,
40 const char* file,
41 size_t skippingStep = 5);
scroggo_chromium 2016/11/11 13:18:42 I may have overlooked something, but it looks like
joostouwerling 2016/11/11 14:43:58 As you guessed correctly, I have a different value
42 void testRandomFrameDecode(DecoderCreator,
43 const char* dir,
44 const char* file,
45 size_t skippingStep = 5);
46
47 void testRandomDecodeAfterClearFrameBufferCache(DecoderCreator,
48 const char* file,
49 size_t skippingStep = 5);
50 void testRandomDecodeAfterClearFrameBufferCache(DecoderCreator,
51 const char* dir,
52 const char* file,
53 size_t skippingStep = 5);
54
55 void testDecodeAfterReallocatingData(DecoderCreator, const char* file);
56 void testDecodeAfterReallocatingData(DecoderCreator,
57 const char* dir,
58 const char* file);
59 void testByteByByteSizeAvailable(DecoderCreator,
60 const char* file,
61 size_t frameOffset,
62 bool hasColorSpace,
63 int expectedRepetitionCount);
64 void testByteByByteSizeAvailable(DecoderCreator,
65 const char* dir,
66 const char* file,
67 size_t frameOffset,
68 bool hasColorSpace,
69 int expectedRepetitionCount);
70 void testProgressiveDecoding(DecoderCreator,
71 const char* file,
72 size_t increment = 1);
scroggo_chromium 2016/11/11 13:18:42 It also looks like we also use the default for bot
joostouwerling 2016/11/11 14:43:58 See above.
73 void testProgressiveDecoding(DecoderCreator,
74 const char* dir,
75 const char* file,
76 size_t increment = 1);
28 } // namespace blink 77 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698