summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfview_embeddertest.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-02-09 21:48:15 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-09 21:48:15 +0000
commit107fa7b06773a2b3e83fc360125d54105574f9bf (patch)
tree760d8dafa3368cae3be175cb4c55173a7b6f5a85 /fpdfsdk/fpdfview_embeddertest.cpp
parent0acd92b3b72a3111e566c1321afacfc78d27848e (diff)
downloadpdfium-107fa7b06773a2b3e83fc360125d54105574f9bf.tar.xz
Get rid of EmbedderTest::RenderPageDeprecated().
Change-Id: I8c6d813e488b2612a85fb1973382f979728df563 Reviewed-on: https://pdfium-review.googlesource.com/25571 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfview_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdfview_embeddertest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/fpdfsdk/fpdfview_embeddertest.cpp b/fpdfsdk/fpdfview_embeddertest.cpp
index c46b3bd14f..ab7606479d 100644
--- a/fpdfsdk/fpdfview_embeddertest.cpp
+++ b/fpdfsdk/fpdfview_embeddertest.cpp
@@ -4,6 +4,7 @@
#include <cmath>
#include <limits>
+#include <memory>
#include <string>
#include "fpdfsdk/fpdfview_c_api_test.h"
@@ -423,20 +424,19 @@ TEST_F(FPDFViewEmbeddertest, FPDF_RenderPageBitmapWithMatrix) {
EXPECT_TRUE(OpenDocument("rectangles.pdf"));
FPDF_PAGE page = LoadPage(0);
- EXPECT_NE(nullptr, page);
+ ASSERT_TRUE(page);
const int page_width = static_cast<int>(FPDF_GetPageWidth(page));
const int page_height = static_cast<int>(FPDF_GetPageHeight(page));
EXPECT_EQ(200, page_width);
EXPECT_EQ(300, page_height);
- FPDF_BITMAP bitmap = RenderPageDeprecated(page);
- CompareBitmap(bitmap, page_width, page_height, kOriginalMD5);
- FPDFBitmap_Destroy(bitmap);
+ std::unique_ptr<void, FPDFBitmapDeleter> bitmap = RenderLoadedPage(page);
+ CompareBitmap(bitmap.get(), page_width, page_height, kOriginalMD5);
FS_RECTF page_rect{0, 0, page_width, page_height};
// Try rendering with an identity matrix. The output should be the same as
- // the RenderPageDeprecated() output.
+ // the RenderLoadedPage() output.
FS_MATRIX identity_matrix{1, 0, 0, 1, 0, 0};
TestRenderPageBitmapWithMatrix(page, page_width, page_height, identity_matrix,
page_rect, kOriginalMD5);