summaryrefslogtreecommitdiff
path: root/core/fxcrt/xml/cfx_xmlinstruction_unittest.cpp
AgeCommit message (Collapse)Author
2018-09-20Fix misc lint errors and other cleanups.Lei Zhang
Change-Id: I00ce0109251d1231858e87ffc3889abe6937fa26 Reviewed-on: https://pdfium-review.googlesource.com/42811 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-08-14Remove CFX_BufferSeekableReadStream.Lei Zhang
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>
2018-07-28Add ToXML{Instruction,Text,CharData}() checked conversion functionsTom Sepez
All usages were previously checked correctly, but this consolidates some code as well. Change-Id: I63711748b31b698a3f21f98fdb536db1e9e0b1cf Reviewed-on: https://pdfium-review.googlesource.com/39010 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-07-26Use moar ToXMLElement() in place of static_cast<>.Tom Sepez
Introduces checks in a few new places, but mainly just consolidates checking/casting logic. Change-Id: I634a03060d254db099972c6978249992367e146c Reviewed-on: https://pdfium-review.googlesource.com/38900 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-07-25Remove CFX_MemoryStream uses in tests.Lei Zhang
Replace with CFX_BufferSeekableReadStream, which allows for spans and const inputs. Change CXFA_DocumentParser to take IFX_SeekableReadStream instead of IFX_SeekableStream in the process. Change-Id: I0168451350c9fc250231f0414c38738a4d86ca42 Reviewed-on: https://pdfium-review.googlesource.com/38852 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-05-02Add a CFX_XMLDocument class.Dan Sinclair
This CL adds a CFX_XMLDocument to act as the XML node container. All nodes are now owned by the document and the document is returned by the CFX_XMLParser. Classes which parse XML files now store the document instead of the root node. BUG: chromium:835636 Change-Id: I1e07d6115cf14714911d6fd4c3fa920c94fd5faf Reviewed-on: https://pdfium-review.googlesource.com/31313 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-05-01Fix CFX_XML and add unit testsDan Sinclair
This CL fixes several issues in the CFX_XML class and adds unit tests. Change-Id: I05270690de8f3c45dceb866e17ef899ae6d23389 Reviewed-on: https://pdfium-review.googlesource.com/31753 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>