summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/embedder_test.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp
index cf0bdf892c..563dec8bec 100644
--- a/testing/embedder_test.cpp
+++ b/testing/embedder_test.cpp
@@ -261,7 +261,12 @@ bool EmbedderTest::OpenDocument(const std::string& filename) {
if (!document_) {
return false;
}
- (void) FPDF_LoadXFA(document_);
+ int docType = DOCTYPE_PDF;
+ if (FPDF_HasXFAField(document_, docType))
+ {
+ if (docType != DOCTYPE_PDF)
+ (void) FPDF_LoadXFA(document_);
+ }
(void) FPDF_GetDocPermissions(document_);
(void) FPDFAvail_IsFormAvail(avail_, &hints_);