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

Side by Side Diff: testing/libfuzzer/xfa_codec_fuzzer.h

Issue 2382723003: Move core/fxcrt/include to core/fxcrt (Closed)
Patch Set: Rebase to master Created 4 years, 2 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
« no previous file with comments | « testing/fx_string_testhelpers.h ('k') | testing/utils/path_service.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The PDFium Authors. All rights reserved. 1 // Copyright 2016 The PDFium 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 #ifndef TESTING_LIBFUZZER_XFA_CODEC_FUZZER_H_ 5 #ifndef TESTING_LIBFUZZER_XFA_CODEC_FUZZER_H_
6 #define TESTING_LIBFUZZER_XFA_CODEC_FUZZER_H_ 6 #define TESTING_LIBFUZZER_XFA_CODEC_FUZZER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "core/fxcodec/codec/include/ccodec_progressivedecoder.h" 10 #include "core/fxcodec/codec/include/ccodec_progressivedecoder.h"
11 #include "core/fxcodec/include/fx_codec.h" 11 #include "core/fxcodec/include/fx_codec.h"
12 #include "core/fxcrt/include/fx_stream.h" 12 #include "core/fxcrt/fx_stream.h"
13 13
14 class XFACodecFuzzer { 14 class XFACodecFuzzer {
15 public: 15 public:
16 static int Fuzz(const uint8_t* data, size_t size, FXCODEC_IMAGE_TYPE type) { 16 static int Fuzz(const uint8_t* data, size_t size, FXCODEC_IMAGE_TYPE type) {
17 std::unique_ptr<CCodec_ModuleMgr> mgr(new CCodec_ModuleMgr()); 17 std::unique_ptr<CCodec_ModuleMgr> mgr(new CCodec_ModuleMgr());
18 std::unique_ptr<CCodec_ProgressiveDecoder> decoder( 18 std::unique_ptr<CCodec_ProgressiveDecoder> decoder(
19 mgr->CreateProgressiveDecoder()); 19 mgr->CreateProgressiveDecoder());
20 Reader source(data, size); 20 Reader source(data, size);
21 21
22 FXCODEC_STATUS status = 22 FXCODEC_STATUS status =
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 FX_FILESIZE GetSize() override { return static_cast<FX_FILESIZE>(m_size); } 58 FX_FILESIZE GetSize() override { return static_cast<FX_FILESIZE>(m_size); }
59 59
60 private: 60 private:
61 const uint8_t* const m_data; 61 const uint8_t* const m_data;
62 size_t m_size; 62 size_t m_size;
63 }; 63 };
64 }; 64 };
65 65
66 #endif // TESTING_LIBFUZZER_XFA_CODEC_FUZZER_H_ 66 #endif // TESTING_LIBFUZZER_XFA_CODEC_FUZZER_H_
OLDNEW
« no previous file with comments | « testing/fx_string_testhelpers.h ('k') | testing/utils/path_service.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698