summaryrefslogtreecommitdiff
path: root/testing/embedder_test.h
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-01-16 19:02:15 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-16 19:02:15 +0000
commitdb269577f5f033c083d10b6327cbd1e1e32feb05 (patch)
tree1c2df50fda364dccba7f6b2e001e3447371535d3 /testing/embedder_test.h
parent2615590b040a2d49413be41cad298e242d1072e8 (diff)
downloadpdfium-db269577f5f033c083d10b6327cbd1e1e32feb05.tar.xz
Add WriteBitmapToPng to EmbedderTest.
This is a util method to output the png to a file for visually validating the result of an embedder test. Once validated, the md5 can be considered correct. Bug: pdfium:981 Change-Id: I544dfbf2e85295e6ca2cdf48d1bc3f0bd5f415e9 Reviewed-on: https://pdfium-review.googlesource.com/22990 Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'testing/embedder_test.h')
-rw-r--r--testing/embedder_test.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/testing/embedder_test.h b/testing/embedder_test.h
index 8da1643824..98432e3e54 100644
--- a/testing/embedder_test.h
+++ b/testing/embedder_test.h
@@ -134,6 +134,12 @@ class EmbedderTest : public ::testing::Test,
// Return the hash of |bitmap|.
static std::string HashBitmap(FPDF_BITMAP bitmap);
+#ifndef NDEBUG
+ // For debugging purposes.
+ // Write |bitmap| to a png file.
+ static void WriteBitmapToPng(FPDF_BITMAP bitmap, const std::string& filename);
+#endif
+
// Check |bitmap| to make sure it has the right dimensions and content.
static void CompareBitmap(FPDF_BITMAP bitmap,
int expected_width,