1 #ifndef APPS_VIEWER_ANDROID_pdfClient_TESTING_DOCUMENT_UTILS_H_ 2 #define APPS_VIEWER_ANDROID_pdfClient_TESTING_DOCUMENT_UTILS_H_ 3 4 #include <fcntl.h> 5 6 #include <memory> 7 #include <string> 8 9 #include "../document.h" 10 #include "../file.h" 11 #include "../page.h" 12 // #include "image/base/rawimage.h" 13 14 namespace pdfClient { 15 namespace testing { 16 17 // 0.0 value float to be used in image diff'ing. 18 static const float kZeroToleranceDifference = 0.0; 19 20 // Creates the full path to the file using ::testing::SrcDir(). 21 std::string CreateTestFilePath(const std::string file_name, const std::string resources_path); 22 23 // Loads and returns a Document. 24 std::unique_ptr<pdfClient::Document> LoadDocument(std::string_view path, 25 const char* password = nullptr); 26 27 std::string GetTempFile(std::string filename); 28 29 } // namespace testing 30 } // namespace pdfClient 31 #endif // APPS_VIEWER_ANDROID_pdfClient_TESTING_DOCUMENT_UTILS_H_ 32