summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_doc_embeddertest.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_doc_embeddertest.cpp b/fpdfsdk/fpdf_doc_embeddertest.cpp
index 43af5f26c7..c1f5e02ed6 100644
--- a/fpdfsdk/fpdf_doc_embeddertest.cpp
+++ b/fpdfsdk/fpdf_doc_embeddertest.cpp
@@ -441,3 +441,17 @@ TEST_F(FPDFDocEmbeddertest, GetPageLabels) {
ASSERT_EQ(0u, FPDF_GetPageLabel(document(), 7, buf, sizeof(buf)));
ASSERT_EQ(0u, FPDF_GetPageLabel(document(), 8, buf, sizeof(buf)));
}
+
+#ifdef PDF_ENABLE_XFA
+TEST_F(FPDFDocEmbeddertest, GetXFALinks) {
+ EXPECT_TRUE(OpenDocument("simple_xfa.pdf"));
+
+ ScopedFPDFPage page(FPDF_LoadPage(document(), 0));
+ ASSERT_TRUE(page);
+
+ FPDFLink_GetLinkAtPoint(page.get(), 150, 360);
+ FPDFLink_GetLinkAtPoint(page.get(), 150, 420);
+
+ // Test passes if it doesn't crash. See https://crbug.com/840922
+}
+#endif // PDF_ENABLE_XFA