summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_doc_embeddertest.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-08-23 20:27:21 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-23 20:27:21 +0000
commite919ec18fc0b008241e5e5371d5762e9fe89de6f (patch)
tree28ce1e1e7dec14948f584ca6d0228e88c8c0c3e6 /fpdfsdk/fpdf_doc_embeddertest.cpp
parentb4f2744daca0e3d3cebdad92fcc28a271cf0767a (diff)
downloadpdfium-e919ec18fc0b008241e5e5371d5762e9fe89de6f.tar.xz
Remove deprecated FPDFDest_GetPageIndex() API.
Use FPDFDest_GetDestPageIndex() instead. BUG=pdfium:1041 Change-Id: I8e91ef46456a60ebd873068765b7c3ff1a991fa4 Reviewed-on: https://pdfium-review.googlesource.com/41230 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_doc_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdf_doc_embeddertest.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/fpdfsdk/fpdf_doc_embeddertest.cpp b/fpdfsdk/fpdf_doc_embeddertest.cpp
index 5c0223ee46..3ba86006d0 100644
--- a/fpdfsdk/fpdf_doc_embeddertest.cpp
+++ b/fpdfsdk/fpdf_doc_embeddertest.cpp
@@ -43,31 +43,26 @@ TEST_F(FPDFDocEmbeddertest, DestGetPageIndex) {
EXPECT_TRUE(OpenDocument("named_dests.pdf"));
// NULL FPDF_DEST case.
- EXPECT_EQ(0U, FPDFDest_GetPageIndex(document(), nullptr));
EXPECT_EQ(-1, FPDFDest_GetDestPageIndex(document(), nullptr));
// Page number directly in item from Dests NameTree.
FPDF_DEST dest = FPDF_GetNamedDestByName(document(), "First");
EXPECT_TRUE(dest);
- EXPECT_EQ(1U, FPDFDest_GetPageIndex(document(), dest));
EXPECT_EQ(1, FPDFDest_GetDestPageIndex(document(), dest));
// Page number via object reference in item from Dests NameTree.
dest = FPDF_GetNamedDestByName(document(), "Next");
EXPECT_TRUE(dest);
- EXPECT_EQ(1U, FPDFDest_GetPageIndex(document(), dest));
EXPECT_EQ(1, FPDFDest_GetDestPageIndex(document(), dest));
// Page number directly in item from Dests dictionary.
dest = FPDF_GetNamedDestByName(document(), "FirstAlternate");
EXPECT_TRUE(dest);
- EXPECT_EQ(11U, FPDFDest_GetPageIndex(document(), dest));
EXPECT_EQ(11, FPDFDest_GetDestPageIndex(document(), dest));
// Invalid object reference in item from Dests NameTree.
dest = FPDF_GetNamedDestByName(document(), "LastAlternate");
EXPECT_TRUE(dest);
- EXPECT_EQ(0U, FPDFDest_GetPageIndex(document(), dest));
EXPECT_EQ(-1, FPDFDest_GetDestPageIndex(document(), dest));
}
@@ -134,7 +129,6 @@ TEST_F(FPDFDocEmbeddertest, DestGetLocationInPage) {
EXPECT_TRUE(OpenDocument("named_dests.pdf"));
// NULL FPDF_DEST case.
- EXPECT_EQ(0U, FPDFDest_GetPageIndex(document(), nullptr));
EXPECT_EQ(-1, FPDFDest_GetDestPageIndex(document(), nullptr));
FPDF_DEST dest = FPDF_GetNamedDestByName(document(), "First");
@@ -162,8 +156,6 @@ TEST_F(FPDFDocEmbeddertest, BUG_680376) {
// 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));
EXPECT_EQ(-1, FPDFDest_GetDestPageIndex(document(), dest));
}