diff options
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r-- | core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp b/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp index 6c1a0e9ae5..df7b5b6873 100644 --- a/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp +++ b/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <memory> #include <string> #include "core/fxcrt/fx_system.h" @@ -58,9 +59,8 @@ TEST_F(CPDFSecurityHandlerEmbeddertest, PasswordAfterGenerateSave) { EXPECT_TRUE(FPDFPath_SetFillColor(red_rect, 255, 0, 0, 255)); EXPECT_TRUE(FPDFPath_SetDrawMode(red_rect, FPDF_FILLMODE_ALTERNATE, 0)); FPDFPage_InsertObject(page, red_rect); - FPDF_BITMAP page_bitmap = RenderPageDeprecated(page); - CompareBitmap(page_bitmap, 612, 792, md5); - FPDFBitmap_Destroy(page_bitmap); + std::unique_ptr<void, FPDFBitmapDeleter> bitmap = RenderLoadedPage(page); + CompareBitmap(bitmap.get(), 612, 792, md5); EXPECT_TRUE(FPDFPage_GenerateContent(page)); SetWholeFileAvailable(); EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); |