Index: testing/embedder_test.cpp |
diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp |
index ffe51192afe88bc8a178496c8d0e1075150f0d8f..6ef7c43f092e2e58532540b55ae7b74203dbb801 100644 |
--- a/testing/embedder_test.cpp |
+++ b/testing/embedder_test.cpp |
@@ -256,7 +256,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_); |