summaryrefslogtreecommitdiff
path: root/testing/test_support.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-04-28 16:54:10 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-02 18:57:50 +0000
commitd9e0e6e46d1f24231b8ab3def4cc197554e96fe7 (patch)
tree811766e948d4946c9db77a1f4bc8816daf3c03bb /testing/test_support.h
parentb31618571938e4873dcf1cdd44eeedb40caa5bd7 (diff)
downloadpdfium-d9e0e6e46d1f24231b8ab3def4cc197554e96fe7.tar.xz
Change BarcodeTest to render to bitmaps.
BarcodeTest renders to bitmaps verifies their checksums. Add some commonly used checksumming code to testing/test_support.h, and use it in tests that have duplicate code. Change-Id: I4a440674ff1084685b5d89576d967333da458a8a Reviewed-on: https://pdfium-review.googlesource.com/4618 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'testing/test_support.h')
-rw-r--r--testing/test_support.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/testing/test_support.h b/testing/test_support.h
index 4fe7c295cd..a2d3528e73 100644
--- a/testing/test_support.h
+++ b/testing/test_support.h
@@ -10,6 +10,7 @@
#include <string>
#include <vector>
+#include "core/fdrm/crypto/fx_crypt.h"
#include "public/fpdf_save.h"
#include "public/fpdfview.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -76,6 +77,9 @@ std::wstring GetPlatformWString(const FPDF_WIDESTRING wstr);
std::unique_ptr<unsigned short, pdfium::FreeDeleter> GetFPDFWideString(
const std::wstring& wstr);
+std::string CryptToBase16(const uint8_t* digest);
+std::string GenerateMD5Base16(const uint8_t* data, uint32_t size);
+
#ifdef PDF_ENABLE_V8
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
bool InitializeV8ForPDFium(const std::string& exe_path,