summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfdoc_embeddertest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfdoc_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdfdoc_embeddertest.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/fpdfsdk/fpdfdoc_embeddertest.cpp b/fpdfsdk/fpdfdoc_embeddertest.cpp
index 5441bb3ecf..3666687d4d 100644
--- a/fpdfsdk/fpdfdoc_embeddertest.cpp
+++ b/fpdfsdk/fpdfdoc_embeddertest.cpp
@@ -68,6 +68,16 @@ TEST_F(FPDFDocEmbeddertest, DestGetLocationInPage) {
EXPECT_EQ(1, zoom);
}
+TEST_F(FPDFDocEmbeddertest, BUG_680376) {
+ EXPECT_TRUE(OpenDocument("bug_680376.pdf"));
+
+ // Page number directly in item from Dests NameTree.
+ FPDF_DEST dest = FPDF_GetNamedDestByName(document(), "First");
+ EXPECT_TRUE(dest);
+ EXPECT_EQ(static_cast<unsigned long>(-1),
+ FPDFDest_GetPageIndex(document(), dest));
+}
+
TEST_F(FPDFDocEmbeddertest, ActionGetFilePath) {
EXPECT_TRUE(OpenDocument("launch_action.pdf"));