summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfppo_embeddertest.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-02-07 20:28:35 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-07 20:28:35 +0000
commita98e36657d0e5a78e216f828b3e712e85250c1a7 (patch)
tree4621be8a3be00efafe28eea4639b87675db80d2b /fpdfsdk/fpdfppo_embeddertest.cpp
parent2496f8e3f3cb1cbfffd664c9b5d7983dc192887b (diff)
downloadpdfium-a98e36657d0e5a78e216f828b3e712e85250c1a7.tar.xz
Clean up RenderPage methods in EmbedderTest.
Add replacement methods that make themselves clear as to what they are rendering, and return unique_ptrs to help prevent leakage. Mark existing methods deprecated. Change-Id: I9055407e614dfbe765428fb32a7da64df3418d1d Reviewed-on: https://pdfium-review.googlesource.com/25470 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfppo_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdfppo_embeddertest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/fpdfppo_embeddertest.cpp b/fpdfsdk/fpdfppo_embeddertest.cpp
index 2a4c774bae..0b3463e391 100644
--- a/fpdfsdk/fpdfppo_embeddertest.cpp
+++ b/fpdfsdk/fpdfppo_embeddertest.cpp
@@ -217,7 +217,7 @@ TEST_F(FPDFPPOEmbeddertest, BUG_750568) {
FPDF_PAGE page = LoadPage(i);
ASSERT_NE(nullptr, page);
- FPDF_BITMAP bitmap = RenderPage(page);
+ FPDF_BITMAP bitmap = RenderPageDeprecated(page);
ASSERT_EQ(200, FPDFBitmap_GetWidth(bitmap));
ASSERT_EQ(200, FPDFBitmap_GetHeight(bitmap));
ASSERT_EQ(800, FPDFBitmap_GetStride(bitmap));
@@ -236,7 +236,7 @@ TEST_F(FPDFPPOEmbeddertest, BUG_750568) {
FPDF_PAGE page = FPDF_LoadPage(output_doc, i);
ASSERT_NE(nullptr, page);
- FPDF_BITMAP bitmap = RenderPage(page);
+ FPDF_BITMAP bitmap = RenderPageDeprecated(page);
ASSERT_EQ(200, FPDFBitmap_GetWidth(bitmap));
ASSERT_EQ(200, FPDFBitmap_GetHeight(bitmap));
ASSERT_EQ(800, FPDFBitmap_GetStride(bitmap));
@@ -254,7 +254,7 @@ TEST_F(FPDFPPOEmbeddertest, ImportWithZeroLengthStream) {
FPDF_PAGE page = LoadPage(0);
ASSERT_NE(nullptr, page);
- FPDF_BITMAP bitmap = RenderPage(page);
+ FPDF_BITMAP bitmap = RenderPageDeprecated(page);
ASSERT_EQ(200, FPDFBitmap_GetWidth(bitmap));
ASSERT_EQ(200, FPDFBitmap_GetHeight(bitmap));
ASSERT_EQ(800, FPDFBitmap_GetStride(bitmap));
@@ -270,7 +270,7 @@ TEST_F(FPDFPPOEmbeddertest, ImportWithZeroLengthStream) {
EXPECT_EQ(1, FPDF_GetPageCount(new_doc));
FPDF_PAGE new_page = FPDF_LoadPage(new_doc, 0);
ASSERT_NE(nullptr, new_page);
- FPDF_BITMAP new_bitmap = RenderPage(new_page);
+ FPDF_BITMAP new_bitmap = RenderPageDeprecated(new_page);
ASSERT_EQ(200, FPDFBitmap_GetWidth(new_bitmap));
ASSERT_EQ(200, FPDFBitmap_GetHeight(new_bitmap));
ASSERT_EQ(800, FPDFBitmap_GetStride(new_bitmap));