summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfformfill_embeddertest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfformfill_embeddertest.cpp')
-rw-r--r--fpdfsdk/fpdfformfill_embeddertest.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/fpdfsdk/fpdfformfill_embeddertest.cpp b/fpdfsdk/fpdfformfill_embeddertest.cpp
index 7779ed25a7..83e560a60c 100644
--- a/fpdfsdk/fpdfformfill_embeddertest.cpp
+++ b/fpdfsdk/fpdfformfill_embeddertest.cpp
@@ -20,7 +20,7 @@
using testing::_;
using testing::Return;
-class FPDFFormFillEmbeddertest : public EmbedderTest, public TestSaver {
+class FPDFFormFillEmbeddertest : public EmbedderTest {
protected:
void TypeTextIntoTextfield(FPDF_PAGE page,
int num_chars,
@@ -366,26 +366,11 @@ TEST_F(FPDFFormFillEmbeddertest, FormText) {
EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0));
- // Close everything
+ // Close page
UnloadPage(page);
- FPDFDOC_ExitFormFillEnvironment(form_handle_);
- FPDF_CloseDocument(document_);
}
// Check saved document
- std::string new_file = GetString();
- FPDF_FILEACCESS file_access;
- memset(&file_access, 0, sizeof(file_access));
- file_access.m_FileLen = new_file.size();
- file_access.m_GetBlock = GetBlockFromString;
- file_access.m_Param = &new_file;
- document_ = FPDF_LoadCustomDocument(&file_access, nullptr);
- SetupFormFillEnvironment();
- EXPECT_EQ(1, FPDF_GetPageCount(document_));
- std::unique_ptr<void, FPDFPageDeleter> new_page(FPDF_LoadPage(document_, 0));
- ASSERT_TRUE(new_page.get());
- std::unique_ptr<void, FPDFBitmapDeleter> new_bitmap(
- RenderPage(new_page.get()));
- CompareBitmap(new_bitmap.get(), 300, 300, md5_3);
+ TestAndCloseSaved(300, 300, md5_3);
}
TEST_F(FPDFFormFillEmbeddertest, GetSelectedTextEmptyAndBasicKeyboard) {