summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-19 08:58:54 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-19 13:16:57 +0000
commit3b71d26f092ebc86ca9177fbbe89d83caa67ae1b (patch)
treea81ab092972ab8a2ce474d8d53984bfe9b6887a8 /testing
parent5af27b63bf94e7f60212f6759c8342ce02da5ad2 (diff)
downloadpdfium-3b71d26f092ebc86ca9177fbbe89d83caa67ae1b.tar.xz
Move CFGAS_Stream to CFX_SeekableStreamProxy
This CL moves the FGAS stream code into core/fxcrt and renames to CFX_SeekableStreamProxy. Change-Id: I6641fe0cca45a128ef3ec281b0b40f8d60296387 Reviewed-on: https://pdfium-review.googlesource.com/4311 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'testing')
-rw-r--r--testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc2
-rw-r--r--testing/libfuzzer/pdf_css_fuzzer.cc2
-rw-r--r--testing/libfuzzer/pdf_xml_fuzzer.cc7
3 files changed, 6 insertions, 5 deletions
diff --git a/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc b/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc
index c27273f29b..7d54cff6da 100644
--- a/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc
+++ b/testing/libfuzzer/pdf_cfx_saxreader_fuzzer.cc
@@ -5,8 +5,8 @@
#include <memory>
#include "core/fxcrt/cfx_retain_ptr.h"
+#include "core/fxcrt/cfx_seekablestreamproxy.h"
#include "core/fxcrt/xml/cfx_saxreader.h"
-#include "xfa/fgas/crt/cfgas_stream.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
CFX_SAXReader reader;
diff --git a/testing/libfuzzer/pdf_css_fuzzer.cc b/testing/libfuzzer/pdf_css_fuzzer.cc
index fef3de74b7..43ce686c22 100644
--- a/testing/libfuzzer/pdf_css_fuzzer.cc
+++ b/testing/libfuzzer/pdf_css_fuzzer.cc
@@ -5,10 +5,10 @@
#include <memory>
#include "core/fxcrt/cfx_retain_ptr.h"
+#include "core/fxcrt/cfx_seekablestreamproxy.h"
#include "core/fxcrt/fx_string.h"
#include "xfa/fde/css/cfde_csssyntaxparser.h"
#include "xfa/fde/css/fde_css.h"
-#include "xfa/fgas/crt/cfgas_stream.h"
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
CFX_WideString input = CFX_WideString::FromUTF8(
diff --git a/testing/libfuzzer/pdf_xml_fuzzer.cc b/testing/libfuzzer/pdf_xml_fuzzer.cc
index 3806f59781..92b61bcd65 100644
--- a/testing/libfuzzer/pdf_xml_fuzzer.cc
+++ b/testing/libfuzzer/pdf_xml_fuzzer.cc
@@ -6,6 +6,7 @@
#include <cstdint>
#include <memory>
+#include "core/fxcrt/cfx_seekablestreamproxy.h"
#include "core/fxcrt/fx_basic.h"
#include "core/fxcrt/fx_safe_types.h"
#include "core/fxcrt/fx_system.h"
@@ -13,7 +14,6 @@
#include "xfa/fde/xml/cfde_xmldoc.h"
#include "xfa/fde/xml/cfde_xmlnode.h"
#include "xfa/fde/xml/cfde_xmlparser.h"
-#include "xfa/fgas/crt/cfgas_stream.h"
namespace {
@@ -51,8 +51,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (!safe_size.IsValid())
return 0;
- CFX_RetainPtr<CFGAS_Stream> stream =
- pdfium::MakeRetain<CFGAS_Stream>(const_cast<uint8_t*>(data), size);
+ CFX_RetainPtr<CFX_SeekableStreamProxy> stream =
+ pdfium::MakeRetain<CFX_SeekableStreamProxy>(const_cast<uint8_t*>(data),
+ size);
auto doc = pdfium::MakeUnique<CFDE_XMLDoc>();
if (!doc->LoadXML(pdfium::MakeUnique<CFDE_XMLParser>(doc->GetRoot(), stream)))
return 0;