summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfedit_embeddertest.cpp
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2017-11-10 20:27:23 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-10 20:27:23 +0000
commit8baea3c694900581fef42ee64795aa5307c6373d (patch)
tree12f1a4415b4bc4906b1faa06efeba5fe72753a45 /fpdfsdk/fpdfedit_embeddertest.cpp
parent267d2a862fd9ec7bc722533914e8e5af8a19df26 (diff)
downloadpdfium-8baea3c694900581fef42ee64795aa5307c6373d.tar.xz
Stop using m_SavedPage in embedder tests.chromium/3265
Change-Id: Id53f57085fecfe331c8cbfa6bb372b5ea5044442 Reviewed-on: https://pdfium-review.googlesource.com/18332 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfedit_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdfedit_embeddertest.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/fpdfsdk/fpdfedit_embeddertest.cpp b/fpdfsdk/fpdfedit_embeddertest.cpp
index f1f02ffa6d..6cb2771154 100644
--- a/fpdfsdk/fpdfedit_embeddertest.cpp
+++ b/fpdfsdk/fpdfedit_embeddertest.cpp
@@ -457,31 +457,31 @@ TEST_F(FPDFEditEmbeddertest, EditOverExistingContent) {
UnloadPage(page);
OpenSavedDocument();
- LoadSavedPage();
- VerifySavedRendering(612, 792, "ad04e5bd0f471a9a564fb034bd0fb073");
+ page = LoadSavedPage(0);
+ VerifySavedRendering(page, 612, 792, "ad04e5bd0f471a9a564fb034bd0fb073");
ClearString();
// Add another opaque rectangle on top of the existing content
FPDF_PAGEOBJECT green_rect = FPDFPageObj_CreateNewRect(150, 700, 25, 50);
EXPECT_TRUE(FPDFPath_SetFillColor(green_rect, 0, 255, 0, 255));
EXPECT_TRUE(FPDFPath_SetDrawMode(green_rect, FPDF_FILLMODE_ALTERNATE, 0));
- FPDFPage_InsertObject(m_SavedPage, green_rect);
+ FPDFPage_InsertObject(page, green_rect);
// Add another transparent rectangle on top of existing content
FPDF_PAGEOBJECT green_rect2 = FPDFPageObj_CreateNewRect(175, 700, 25, 50);
EXPECT_TRUE(FPDFPath_SetFillColor(green_rect2, 0, 255, 0, 100));
EXPECT_TRUE(FPDFPath_SetDrawMode(green_rect2, FPDF_FILLMODE_ALTERNATE, 0));
- FPDFPage_InsertObject(m_SavedPage, green_rect2);
- FPDF_BITMAP new_bitmap = RenderPageWithFlags(m_SavedPage, m_SavedForm, 0);
+ FPDFPage_InsertObject(page, green_rect2);
+ FPDF_BITMAP new_bitmap = RenderPageWithFlags(page, m_SavedForm, 0);
const char last_md5[] = "4b5b00f824620f8c9b8801ebb98e1cdd";
CompareBitmap(new_bitmap, 612, 792, last_md5);
FPDFBitmap_Destroy(new_bitmap);
- EXPECT_TRUE(FPDFPage_GenerateContent(m_SavedPage));
+ EXPECT_TRUE(FPDFPage_GenerateContent(page));
// Now save the result, closing the page and document
EXPECT_TRUE(FPDF_SaveAsCopy(m_SavedDocument, this, 0));
- CloseSavedPage();
+ CloseSavedPage(page);
CloseSavedDocument();
// Render the saved result