summaryrefslogtreecommitdiff
path: root/testing/test_support.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-08-28 10:11:24 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-28 15:07:01 +0000
commit574d4408a5174bb410cf4ec3db24283671bcce79 (patch)
tree907e53814373e98780de4eabeb55ca48f8669a29 /testing/test_support.h
parent133617c2d2b941e239e9234b1a4e9dc7476a2fa5 (diff)
downloadpdfium-574d4408a5174bb410cf4ec3db24283671bcce79.tar.xz
Add a global font loader in XFA tests
This CL creates a global font loader for use in XFA tests. This is needed because the CFGAS_FontMangaer takes a linearly increasing amount of time to load fonts each time it's loaded. This can get excessively slow for test suites which run a lot of tests. Change-Id: Ie389844b56598ce414f4f761654fa4ed465955fd Reviewed-on: https://pdfium-review.googlesource.com/12090 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'testing/test_support.h')
-rw-r--r--testing/test_support.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/testing/test_support.h b/testing/test_support.h
index feec4bbe0b..7525c10b36 100644
--- a/testing/test_support.h
+++ b/testing/test_support.h
@@ -13,6 +13,10 @@
#include "public/fpdfview.h"
+#if PDF_ENABLE_XFA
+#include "xfa/fgas/font/cfgas_fontmgr.h"
+#endif // PDF_ENABLE_XFA
+
namespace pdfium {
#define STR_IN_TEST_CASE(input_literal, ...) \
@@ -110,4 +114,8 @@ class TestLoader {
const size_t m_Len;
};
+#if PDF_ENABLE_XFA
+CFGAS_FontMgr* GetGlobalFontManager();
+#endif // PDF_ENABLE_XFA
+
#endif // TESTING_TEST_SUPPORT_H_