Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Unified Diff: testing/test_support.h

Issue 1569973002: Merge to XFA: Disentangle fpdfsave_embeddertest's FPDF_FILEWRITE. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fpdfsave_embeddertest.cpp ('k') | testing/test_support.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/test_support.h
diff --git a/testing/test_support.h b/testing/test_support.h
index 945704194d53855f444db43636d6217753357726..f59d5440e77421ba6af13e08f71ab5655565e186 100644
--- a/testing/test_support.h
+++ b/testing/test_support.h
@@ -10,6 +10,7 @@
#include <string>
#include "public/fpdfview.h"
+#include "public/fpdf_save.h"
#ifdef PDF_ENABLE_V8
#include "v8/include/v8.h"
@@ -62,4 +63,19 @@ class TestLoader {
const size_t m_Len;
};
+class TestSaver : public FPDF_FILEWRITE {
+ public:
+ TestSaver();
+
+ void ClearString();
+ const std::string& GetString() const { return m_String; }
+
+ private:
+ static int WriteBlockCallback(FPDF_FILEWRITE* pFileWrite,
+ const void* data,
+ unsigned long size);
+
+ std::string m_String;
+};
+
#endif // TESTING_EMBEDDER_TEST_SUPPORT_H_
« no previous file with comments | « fpdfsdk/src/fpdfsave_embeddertest.cpp ('k') | testing/test_support.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698