summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfedit_embeddertest.cpp
diff options
context:
space:
mode:
authorJane Liu <janeliulwq@google.com>2017-08-08 15:23:27 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-08 20:31:16 +0000
commit2e5f0ae97c163841c93c891aa5933adbde47e710 (patch)
treeefb44c1e304ccf5873deaaa3f3b6316c0638b187 /fpdfsdk/fpdfedit_embeddertest.cpp
parent9f0e85ac36826e39a242f8039c2b2c333ee99f4f (diff)
downloadpdfium-2e5f0ae97c163841c93c891aa5933adbde47e710.tar.xz
Added FPDFPageObj_Destroy() for freeing page objects created
Bug=pdfium:854 Change-Id: I227418cdcb77e0aa7d48338f1ee0d753cef6bfdb Reviewed-on: https://pdfium-review.googlesource.com/10390 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Jane Liu <janeliulwq@google.com>
Diffstat (limited to 'fpdfsdk/fpdfedit_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdfedit_embeddertest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/fpdfsdk/fpdfedit_embeddertest.cpp b/fpdfsdk/fpdfedit_embeddertest.cpp
index f1bbb87422..c381b25efa 100644
--- a/fpdfsdk/fpdfedit_embeddertest.cpp
+++ b/fpdfsdk/fpdfedit_embeddertest.cpp
@@ -1030,3 +1030,11 @@ TEST_F(FPDFEditEmbeddertest, GetImageData) {
UnloadPage(page);
}
+
+TEST_F(FPDFEditEmbeddertest, DestroyPageObject) {
+ FPDF_PAGEOBJECT rect = FPDFPageObj_CreateNewRect(10, 10, 20, 20);
+ ASSERT_TRUE(rect);
+
+ // There should be no memory leaks with a call to FPDFPageObj_Destroy().
+ FPDFPageObj_Destroy(rect);
+}