Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2813)

Unified Diff: core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp

Issue 2514173002: Check dimensions and content of bitmaps in EmbedderTests. (Closed)
Patch Set: Use built-in md5sum, rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp
diff --git a/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp b/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp
index 639dcbf44ca142c4a6798c3a321a14c5d0cacae9..9dfc26e369f34ffdee460bda85e3535c5934b472 100644
--- a/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp
+++ b/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp
@@ -92,6 +92,7 @@ TEST_F(FPDFParserDecodeEmbeddertest, Bug_552046) {
EXPECT_TRUE(OpenDocument("bug_552046.pdf"));
FPDF_PAGE page = LoadPage(0);
FPDF_BITMAP bitmap = RenderPage(page);
+ CompareBitmap(bitmap, 612, 792, "1940568c9ba33bac5d0b1ee9558c76b3");
FPDFBitmap_Destroy(bitmap);
UnloadPage(page);
}
@@ -102,6 +103,7 @@ TEST_F(FPDFParserDecodeEmbeddertest, Bug_555784) {
EXPECT_TRUE(OpenDocument("bug_555784.pdf"));
FPDF_PAGE page = LoadPage(0);
FPDF_BITMAP bitmap = RenderPage(page);
+ CompareBitmap(bitmap, 612, 792, "1940568c9ba33bac5d0b1ee9558c76b3");
FPDFBitmap_Destroy(bitmap);
UnloadPage(page);
}
@@ -112,6 +114,13 @@ TEST_F(FPDFParserDecodeEmbeddertest, Bug_455199) {
EXPECT_TRUE(OpenDocument("bug_455199.pdf"));
FPDF_PAGE page = LoadPage(0);
FPDF_BITMAP bitmap = RenderPage(page);
+#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
+ // Rendering on Mac is inconsistent, so skip this check.
+ const char* const kExpectedMd5sum = nullptr;
+#else
+ const char kExpectedMd5sum[] = "6f9f0fd903da177babb24dd50a806a56";
+#endif
+ CompareBitmap(bitmap, 200, 200, kExpectedMd5sum);
FPDFBitmap_Destroy(bitmap);
UnloadPage(page);
}
« no previous file with comments | « core/fpdfapi/page/fpdf_page_func_embeddertest.cpp ('k') | core/fpdfapi/render/fpdf_render_loadimage_embeddertest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698