From e08d2b1fee0db40bac9538ca8b7be0a951675bd6 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 25 Apr 2018 18:49:32 +0000 Subject: Introduce ScopedFPDF types in public/cpp/fpdf_scopers.h Applies std::remove_ptr to the public API types so that we can deduce a correct unique ptr type no matter how that API might change away from void* usage. Creates shorter names for std::unique_ptr, ...> Change-Id: I04a0ff43cb7d5a4d3867939a53a54c9cef00db86 Reviewed-on: https://pdfium-review.googlesource.com/31292 Reviewed-by: Lei Zhang Reviewed-by: dsinclair Commit-Queue: Tom Sepez --- fpdfsdk/fpdf_formfill_embeddertest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'fpdfsdk/fpdf_formfill_embeddertest.cpp') diff --git a/fpdfsdk/fpdf_formfill_embeddertest.cpp b/fpdfsdk/fpdf_formfill_embeddertest.cpp index cedb96c0ca..94c16f3290 100644 --- a/fpdfsdk/fpdf_formfill_embeddertest.cpp +++ b/fpdfsdk/fpdf_formfill_embeddertest.cpp @@ -9,7 +9,7 @@ #include "core/fxcrt/fx_coordinates.h" #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" -#include "public/cpp/fpdf_deleters.h" +#include "public/cpp/fpdf_scopers.h" #include "public/fpdf_formfill.h" #include "public/fpdf_fwlevent.h" #include "testing/embedder_test.h" @@ -586,7 +586,7 @@ TEST_F(FPDFFormFillEmbeddertest, FormText) { EXPECT_TRUE(OpenDocument("text_form.pdf")); FPDF_PAGE page = LoadPage(0); ASSERT_TRUE(page); - std::unique_ptr bitmap1 = RenderLoadedPage(page); + ScopedFPDFBitmap bitmap1 = RenderLoadedPage(page); CompareBitmap(bitmap1.get(), 300, 300, md5_1); // Click on the textfield @@ -600,14 +600,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 bitmap2 = RenderLoadedPage(page); + ScopedFPDFBitmap 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 bitmap3 = RenderLoadedPage(page); + ScopedFPDFBitmap bitmap3 = RenderLoadedPage(page); CompareBitmap(bitmap3.get(), 300, 300, md5_3); EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); -- cgit v1.2.3