summaryrefslogtreecommitdiff
path: root/core/fxcrt/xml/cfx_saxreaderhandler.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-04-17 09:07:48 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-17 16:24:38 +0000
commit16b9d77ceb55e102260bc44cf1c8f519d11d6769 (patch)
tree41f8a63fa49f093a35f071bb38eda417d60ce94e /core/fxcrt/xml/cfx_saxreaderhandler.h
parentba91bed89a9fecfae3e175abcd4e333057e3f9c8 (diff)
downloadpdfium-16b9d77ceb55e102260bc44cf1c8f519d11d6769.tar.xz
Add unit test for CFX_SAXReader.
Make the pending re-write CL smaller, and back-fill some test. Virtualize the handler interface so that it can be mocked. Change-Id: Icbbc6b6789ba135b73c6fd1bbb90f5aae6ab7649 Reviewed-on: https://pdfium-review.googlesource.com/4250 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcrt/xml/cfx_saxreaderhandler.h')
-rw-r--r--core/fxcrt/xml/cfx_saxreaderhandler.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/core/fxcrt/xml/cfx_saxreaderhandler.h b/core/fxcrt/xml/cfx_saxreaderhandler.h
index bfedf03846..c5e1dc28b6 100644
--- a/core/fxcrt/xml/cfx_saxreaderhandler.h
+++ b/core/fxcrt/xml/cfx_saxreaderhandler.h
@@ -13,31 +13,30 @@
class CFX_ChecksumContext;
-class CFX_SAXReaderHandler {
+class CFX_SAXReaderHandler : public CFX_SAXReader::HandlerIface {
public:
explicit CFX_SAXReaderHandler(CFX_ChecksumContext* pContext);
- ~CFX_SAXReaderHandler();
+ ~CFX_SAXReaderHandler() override;
CFX_SAXContext* OnTagEnter(const CFX_ByteStringC& bsTagName,
CFX_SAXItem::Type eType,
- uint32_t dwStartPos);
+ uint32_t dwStartPos) override;
void OnTagAttribute(CFX_SAXContext* pTag,
const CFX_ByteStringC& bsAttri,
- const CFX_ByteStringC& bsValue);
- void OnTagBreak(CFX_SAXContext* pTag);
+ const CFX_ByteStringC& bsValue) override;
+ void OnTagBreak(CFX_SAXContext* pTag) override;
void OnTagData(CFX_SAXContext* pTag,
CFX_SAXItem::Type eType,
const CFX_ByteStringC& bsData,
- uint32_t dwStartPos);
- void OnTagClose(CFX_SAXContext* pTag, uint32_t dwEndPos);
+ uint32_t dwStartPos) override;
+ void OnTagClose(CFX_SAXContext* pTag, uint32_t dwEndPos) override;
void OnTagEnd(CFX_SAXContext* pTag,
const CFX_ByteStringC& bsTagName,
- uint32_t dwEndPos);
-
+ uint32_t dwEndPos) override;
void OnTargetData(CFX_SAXContext* pTag,
CFX_SAXItem::Type eType,
const CFX_ByteStringC& bsData,
- uint32_t dwStartPos);
+ uint32_t dwStartPos) override;
private:
void UpdateChecksum(bool bCheckSpace);