summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfformfill_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/fpdfformfill_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/fpdfformfill_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdfformfill_embeddertest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/fpdfformfill_embeddertest.cpp b/fpdfsdk/fpdfformfill_embeddertest.cpp
index ae1c02ede1..8b81467822 100644
--- a/fpdfsdk/fpdfformfill_embeddertest.cpp
+++ b/fpdfsdk/fpdfformfill_embeddertest.cpp
@@ -532,7 +532,7 @@ TEST_F(FPDFFormFillEmbeddertest, FormText) {
EXPECT_TRUE(OpenDocument("text_form.pdf"));
FPDF_PAGE page = LoadPage(0);
ASSERT_TRUE(page);
- std::unique_ptr<void, FPDFBitmapDeleter> bitmap1(RenderPage(page));
+ std::unique_ptr<void, FPDFBitmapDeleter> bitmap1 = RenderLoadedPage(page);
CompareBitmap(bitmap1.get(), 300, 300, md5_1);
// Click on the textfield
@@ -546,14 +546,14 @@ TEST_F(FPDFFormFillEmbeddertest, FormText) {
FORM_OnChar(form_handle(), page, 65, 0);
FORM_OnChar(form_handle(), page, 66, 0);
FORM_OnChar(form_handle(), page, 67, 0);
- std::unique_ptr<void, FPDFBitmapDeleter> bitmap2(RenderPage(page));
+ std::unique_ptr<void, FPDFBitmapDeleter> bitmap2 = RenderLoadedPage(page);
CompareBitmap(bitmap2.get(), 300, 300, md5_2);
// Take out focus by clicking out of the textfield
FORM_OnMouseMove(form_handle(), page, 0, 15.0, 15.0);
FORM_OnLButtonDown(form_handle(), page, 0, 15.0, 15.0);
FORM_OnLButtonUp(form_handle(), page, 0, 15.0, 15.0);
- std::unique_ptr<void, FPDFBitmapDeleter> bitmap3(RenderPage(page));
+ std::unique_ptr<void, FPDFBitmapDeleter> bitmap3 = RenderLoadedPage(page);
CompareBitmap(bitmap3.get(), 300, 300, md5_3);
EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0));