From 916b4b05ce7b4dd5a254a72a1d98051655627dbc Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Mon, 19 Feb 2018 15:33:13 +0000 Subject: Skip font loading in formcalc embedder tests This CL changes XFA to skip font loading for embedder tests. This takes the runtime for the CFXJSE_Formcalc_ECFXJSE_FormCalcContextEmbedderTest run from ~25sec to ~5sec. Change-Id: If9989c5a3474cccd3915ec3f5c178d7af48aae37 Reviewed-on: https://pdfium-review.googlesource.com/27191 Commit-Queue: Ryan Harrison Reviewed-by: Ryan Harrison --- testing/xfa_js_embedder_test.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'testing/xfa_js_embedder_test.cpp') diff --git a/testing/xfa_js_embedder_test.cpp b/testing/xfa_js_embedder_test.cpp index 8ac17f3083..133a938643 100644 --- a/testing/xfa_js_embedder_test.cpp +++ b/testing/xfa_js_embedder_test.cpp @@ -11,6 +11,7 @@ #include "fxjs/cfxjse_engine.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/base/ptr_util.h" +#include "xfa/fxfa/cxfa_ffapp.h" XFAJSEmbedderTest::XFAJSEmbedderTest() : array_buffer_allocator_( @@ -26,9 +27,13 @@ void XFAJSEmbedderTest::SetUp() { EmbedderTest::SetExternalIsolate(isolate_); EmbedderTest::SetUp(); + + CXFA_FFApp::SkipFontLoadForTesting(true); } void XFAJSEmbedderTest::TearDown() { + CXFA_FFApp::SkipFontLoadForTesting(false); + value_.reset(); script_context_ = nullptr; -- cgit v1.2.3