diff options
author | Lei Zhang <thestig@chromium.org> | 2018-08-14 18:26:36 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-14 18:26:36 +0000 |
commit | 88798cff29934b58e0a8d81e94005472d612b964 (patch) | |
tree | 3b5a25faa2a627ac30de219b89c8152a9fff2f27 /xfa | |
parent | b9c3e2712f75363372622282023143b86b72f2df (diff) | |
download | pdfium-88798cff29934b58e0a8d81e94005472d612b964.tar.xz |
Remove CFX_BufferSeekableReadStream.
Replace it with CFX_ReadOnlyMemoryStream, which does the same thing.
Take some checks from CFX_BufferSeekableReadStream and add them
CFX_ReadOnlyMemoryStream.
Change-Id: I25554c3aec3ec96967f8df16ca68a64dba121b6f
Reviewed-on: https://pdfium-review.googlesource.com/40070
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r-- | xfa/fxfa/parser/cxfa_document_parser_unittest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xfa/fxfa/parser/cxfa_document_parser_unittest.cpp b/xfa/fxfa/parser/cxfa_document_parser_unittest.cpp index 62bd380326..7ce2efe954 100644 --- a/xfa/fxfa/parser/cxfa_document_parser_unittest.cpp +++ b/xfa/fxfa/parser/cxfa_document_parser_unittest.cpp @@ -4,7 +4,7 @@ #include "xfa/fxfa/parser/cxfa_document_parser.h" -#include "testing/fx_string_testhelpers.h" +#include "core/fxcrt/cfx_readonlymemorystream.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/test_support.h" #include "xfa/fxfa/parser/cxfa_document.h" @@ -39,7 +39,7 @@ TEST_F(CXFA_DocumentParserTest, XMLInstructionsScriptOff) { "</config>"; EXPECT_FALSE(GetDoc()->HasFlag(XFA_DOCFLAG_Scripting)); - auto stream = pdfium::MakeRetain<CFX_BufferSeekableReadStream>( + auto stream = pdfium::MakeRetain<CFX_ReadOnlyMemoryStream>( pdfium::as_bytes(pdfium::make_span(input))); ASSERT_TRUE(GetParser()->Parse(stream, XFA_PacketType::Config)); @@ -57,7 +57,7 @@ TEST_F(CXFA_DocumentParserTest, XMLInstructionsScriptOn) { EXPECT_FALSE(GetDoc()->HasFlag(XFA_DOCFLAG_Scripting)); - auto stream = pdfium::MakeRetain<CFX_BufferSeekableReadStream>( + auto stream = pdfium::MakeRetain<CFX_ReadOnlyMemoryStream>( pdfium::as_bytes(pdfium::make_span(input))); ASSERT_TRUE(GetParser()->Parse(stream, XFA_PacketType::Config)); @@ -74,7 +74,7 @@ TEST_F(CXFA_DocumentParserTest, XMLInstructionsStrictScope) { EXPECT_FALSE(GetDoc()->HasFlag(XFA_DOCFLAG_StrictScoping)); - auto stream = pdfium::MakeRetain<CFX_BufferSeekableReadStream>( + auto stream = pdfium::MakeRetain<CFX_ReadOnlyMemoryStream>( pdfium::as_bytes(pdfium::make_span(input))); ASSERT_TRUE(GetParser()->Parse(stream, XFA_PacketType::Config)); @@ -91,7 +91,7 @@ TEST_F(CXFA_DocumentParserTest, XMLInstructionsStrictScopeBad) { EXPECT_FALSE(GetDoc()->HasFlag(XFA_DOCFLAG_StrictScoping)); - auto stream = pdfium::MakeRetain<CFX_BufferSeekableReadStream>( + auto stream = pdfium::MakeRetain<CFX_ReadOnlyMemoryStream>( pdfium::as_bytes(pdfium::make_span(input))); ASSERT_TRUE(GetParser()->Parse(stream, XFA_PacketType::Config)); @@ -111,7 +111,7 @@ TEST_F(CXFA_DocumentParserTest, MultipleXMLInstructions) { EXPECT_FALSE(GetDoc()->HasFlag(XFA_DOCFLAG_Scripting)); EXPECT_FALSE(GetDoc()->HasFlag(XFA_DOCFLAG_StrictScoping)); - auto stream = pdfium::MakeRetain<CFX_BufferSeekableReadStream>( + auto stream = pdfium::MakeRetain<CFX_ReadOnlyMemoryStream>( pdfium::as_bytes(pdfium::make_span(input))); ASSERT_TRUE(GetParser()->Parse(stream, XFA_PacketType::Config)); |