summaryrefslogtreecommitdiff
path: root/testing/fuzzers/pdfium_fuzzer_helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'testing/fuzzers/pdfium_fuzzer_helper.h')
-rw-r--r--testing/fuzzers/pdfium_fuzzer_helper.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/fuzzers/pdfium_fuzzer_helper.h b/testing/fuzzers/pdfium_fuzzer_helper.h
new file mode 100644
index 0000000000..f9db00fa64
--- /dev/null
+++ b/testing/fuzzers/pdfium_fuzzer_helper.h
@@ -0,0 +1,25 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef TESTING_FUZZERS_PDFIUM_FUZZER_HELPER_H_
+#define TESTING_FUZZERS_PDFIUM_FUZZER_HELPER_H_
+
+#include "public/fpdfview.h"
+
+class PDFiumFuzzerHelper {
+ public:
+ void RenderPdf(const char* pBuf, size_t len);
+
+ virtual int GetFormCallbackVersion() const = 0;
+ virtual bool OnFormFillEnvLoaded(FPDF_DOCUMENT doc);
+
+ protected:
+ PDFiumFuzzerHelper();
+ virtual ~PDFiumFuzzerHelper();
+
+ private:
+ bool RenderPage(FPDF_DOCUMENT doc, FPDF_FORMHANDLE form, int page_index);
+};
+
+#endif // TESTING_FUZZERS_PDFIUM_FUZZER_HELPER_H_