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.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/fpdfsdk/fpdfdoc_embeddertest.cpp b/fpdfsdk/fpdfdoc_embeddertest.cpp
index 855235858b..2450b6aea6 100644
--- a/fpdfsdk/fpdfdoc_embeddertest.cpp
+++ b/fpdfsdk/fpdfdoc_embeddertest.cpp
@@ -6,6 +6,7 @@
#include "core/fxcrt/include/fx_string.h"
#include "public/fpdf_doc.h"
+#include "public/fpdf_edit.h"
#include "public/fpdfview.h"
#include "testing/embedder_test.h"
#include "testing/fx_string_testhelpers.h"
@@ -138,3 +139,10 @@ TEST_F(FPDFDocEmbeddertest, FindBookmarks_bug420) {
GetFPDFWideString(L"anything");
EXPECT_EQ(nullptr, FPDFBookmark_Find(document(), title.get()));
}
+
+TEST_F(FPDFDocEmbeddertest, DeletePage) {
+ EXPECT_TRUE(OpenDocument("hello_world.pdf"));
+ EXPECT_EQ(1, FPDF_GetPageCount(document()));
+ FPDFPage_Delete(document(), 0);
+ EXPECT_EQ(0, FPDF_GetPageCount(document()));
+}