From 574d4408a5174bb410cf4ec3db24283671bcce79 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 28 Aug 2017 10:11:24 -0400 Subject: 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 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- testing/test_support.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'testing/test_support.h') 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_ -- cgit v1.2.3