| Index: testing/embedder_test.cpp
|
| diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp
|
| index c23b5c8018d78c4bdf1a88b0d0726c4b0ca62b3c..5fd540893c3501658999491e30c5d640543e5be0 100644
|
| --- a/testing/embedder_test.cpp
|
| +++ b/testing/embedder_test.cpp
|
| @@ -17,6 +17,7 @@
|
| #include "public/fpdfview.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/test_support.h"
|
| +#include "testing/utils/md5.h"
|
| #include "testing/utils/path_service.h"
|
|
|
| #ifdef PDF_ENABLE_V8
|
| @@ -323,6 +324,20 @@ FPDF_PAGE EmbedderTest::GetPageTrampoline(FPDF_FORMFILLINFO* info,
|
| page_index);
|
| }
|
|
|
| +// static
|
| +void EmbedderTest::CompareBitmap(FPDF_BITMAP bitmap,
|
| + int expected_width,
|
| + int expected_height,
|
| + const char* expected_md5sum) {
|
| + ASSERT_EQ(expected_width, FPDFBitmap_GetWidth(bitmap));
|
| + ASSERT_EQ(expected_height, FPDFBitmap_GetHeight(bitmap));
|
| + const int expected_stride = expected_width * 4;
|
| + ASSERT_EQ(expected_stride, FPDFBitmap_GetStride(bitmap));
|
| + EXPECT_EQ(expected_md5sum,
|
| + pdfium::MD5String(FPDFBitmap_GetBuffer(bitmap),
|
| + expected_stride * expected_height));
|
| +}
|
| +
|
| // Can't use gtest-provided main since we need to stash the path to the
|
| // executable in order to find the external V8 binary data files.
|
| int main(int argc, char** argv) {
|
|
|