summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-05-01 17:25:25 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-01 17:25:25 +0000
commitfe06d5109cd575c1e53b9b1cc3cc4ec3c5d7364f (patch)
treefb6744bab0823722b566978e6a8195bf1509b8b2 /testing
parent302c8ce0ee78ecb10398c9b1fa2796d116bbb4a5 (diff)
downloadpdfium-fe06d5109cd575c1e53b9b1cc3cc4ec3c5d7364f.tar.xz
Make FPDF_Document always be CPDF_Document.
Greatly minimize the impact between going back and forth from XFA being on/off, so that XFA case is just an extension beyond the non-XFA data structures we've shipped for years, instead of being a complete replacement of them. Change-Id: I6c98206e0ec99ea443547a4931eba912b1764d54 Reviewed-on: https://pdfium-review.googlesource.com/31690 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'testing')
-rw-r--r--testing/xfa_js_embedder_test.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/testing/xfa_js_embedder_test.cpp b/testing/xfa_js_embedder_test.cpp
index 995c0ed1d5..375497f9ea 100644
--- a/testing/xfa_js_embedder_test.cpp
+++ b/testing/xfa_js_embedder_test.cpp
@@ -44,7 +44,9 @@ void XFAJSEmbedderTest::TearDown() {
}
CXFA_Document* XFAJSEmbedderTest::GetXFADocument() {
- return UnderlyingFromFPDFDocument(document())->GetXFADoc()->GetXFADoc();
+ auto* pDoc = CPDFDocumentFromFPDFDocument(document());
+ auto* pContext = static_cast<CPDFXFA_Context*>(pDoc->GetExtension());
+ return pContext->GetXFADoc()->GetXFADoc();
}
bool XFAJSEmbedderTest::OpenDocumentWithOptions(