diff options
-rw-r--r-- | fpdfsdk/fpdf_doc_embeddertest.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_doc_embeddertest.cpp b/fpdfsdk/fpdf_doc_embeddertest.cpp index dc367d8e26..d90cc370e3 100644 --- a/fpdfsdk/fpdf_doc_embeddertest.cpp +++ b/fpdfsdk/fpdf_doc_embeddertest.cpp @@ -165,11 +165,18 @@ TEST_F(FPDFDocEmbeddertest, BUG_821454) { FPDF_PAGE page = LoadPage(0); ASSERT_TRUE(page); + // Cover some NULL arg cases while we're at it. + EXPECT_FALSE(FPDFLink_GetLinkAtPoint(nullptr, 150, 360)); + EXPECT_EQ(-1, FPDFLink_GetLinkZOrderAtPoint(nullptr, 150, 360)); + FPDF_LINK link1 = FPDFLink_GetLinkAtPoint(page, 150, 360); ASSERT_TRUE(link1); FPDF_LINK link2 = FPDFLink_GetLinkAtPoint(page, 150, 420); ASSERT_TRUE(link2); + EXPECT_EQ(0, FPDFLink_GetLinkZOrderAtPoint(page, 150, 360)); + EXPECT_EQ(1, FPDFLink_GetLinkZOrderAtPoint(page, 150, 420)); + FPDF_DEST dest1 = FPDFLink_GetDest(document(), link1); ASSERT_TRUE(dest1); FPDF_DEST dest2 = FPDFLink_GetDest(document(), link2); |