Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(657)

Unified Diff: fpdfsdk/fpdfdoc_embeddertest.cpp

Issue 1921033003: Fixup page removal for XFA documents. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfdoc_embeddertest.cpp
diff --git a/fpdfsdk/fpdfdoc_embeddertest.cpp b/fpdfsdk/fpdfdoc_embeddertest.cpp
index 855235858b2bada749bba8cfcf3357b9ad264072..2450b6aea61cc829a3d59e6f71fd40adee61ff6e 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()));
+}
« no previous file with comments | « no previous file | fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698