summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-11-21 13:37:28 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-21 13:37:28 -0800
commitbcd3e538f170a5ab2c3295f1a3b0062781d384a5 (patch)
tree0a16f383cfd22b4b9d26c7acdb085d5b05843631 /core/fpdfapi/parser
parentd33c8e3145539631d03242a16c3683c3538c7557 (diff)
downloadpdfium-bcd3e538f170a5ab2c3295f1a3b0062781d384a5.tar.xz
Check dimensions and content of bitmaps in EmbedderTests.chromium/2927
Review-Url: https://codereview.chromium.org/2514173002
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r--core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp b/core/fpdfapi/parser/fpdf_parser_decode_embeddertest.cpp
index 639dcbf44c..9dfc26e369 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);
}