diff options
Diffstat (limited to 'fpdfsdk/fpdf_flatten_embeddertest.cpp')
-rw-r--r-- | fpdfsdk/fpdf_flatten_embeddertest.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_flatten_embeddertest.cpp b/fpdfsdk/fpdf_flatten_embeddertest.cpp index a8915fe60c..c861d75711 100644 --- a/fpdfsdk/fpdf_flatten_embeddertest.cpp +++ b/fpdfsdk/fpdf_flatten_embeddertest.cpp @@ -37,3 +37,20 @@ TEST_F(FPDFFlattenEmbeddertest, FlatPrint) { EXPECT_EQ(FLATTEN_SUCCESS, FPDFPage_Flatten(page, FLAT_PRINT)); UnloadPage(page); } + +TEST_F(FPDFFlattenEmbeddertest, BUG_890322) { + static const char md5_hash[] = "6c674642154408e877d88c6c082d67e9"; + EXPECT_TRUE(OpenDocument("bug_890322.pdf")); + FPDF_PAGE page = LoadPage(0); + ASSERT_TRUE(page); + + ScopedFPDFBitmap bitmap = RenderLoadedPageWithFlags(page, FPDF_ANNOT); + CompareBitmap(bitmap.get(), 200, 200, md5_hash); + + EXPECT_EQ(FLATTEN_SUCCESS, FPDFPage_Flatten(page, FLAT_PRINT)); + EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); + + UnloadPage(page); + + VerifySavedDocument(200, 200, md5_hash); +} |