Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
path_service.h
Go to the documentation of this file.
1// Copyright 2015 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef TESTING_UTILS_PATH_SERVICE_H_
6#define TESTING_UTILS_PATH_SERVICE_H_
7
8#include <string>
9
10#ifdef _WIN32
11#define PATH_SEPARATOR '\\'
12#else
13#define PATH_SEPARATOR '/'
14#endif
15
16// Get the various file directory and path information.
18 public:
19 // Return true when the path is a directory that exists.
20 static bool DirectoryExists(const std::string& path);
21
22 // Return true when the path ends with a path separator.
23 static bool EndsWithSeparator(const std::string& path);
24
25 // Retrieve the directory where executables run from.
26 static bool GetExecutableDir(std::string* path);
27
28 // Retrieve the root directory of the source tree.
29 // Assume executables always run from out/<build_dir_name>/, so the source
30 // directory is two levels above the executable directory.
31 static bool GetSourceDir(std::string* path);
32
33 // Retrieve the test data directory where test files are stored.
34 // Try <source_dir>/testing/resources/ first. If it does not exist, try
35 // checking <source_dir>/third_party/pdfium/testing/resources/.
36 static bool GetTestDataDir(std::string* path);
37
38 // Get the full path for a test file under the test data directory.
39 // Returns an empty string on failure.
40 static std::string GetTestFilePath(const std::string& file_name);
41
42 // Get the full path for a file under the third-party directory.
43 static bool GetThirdPartyFilePath(const std::string& file_name,
44 std::string* path);
45};
46#endif // TESTING_UTILS_PATH_SERVICE_H_
RetainPtr< CPDF_TransferFunc > GetTransferFunc(RetainPtr< const CPDF_Object > pObj)
CPDF_DocRenderData & operator=(const CPDF_DocRenderData &)=delete
RetainPtr< CPDF_TransferFunc > CreateTransferFunc(RetainPtr< const CPDF_Object > pObj) const
static CPDF_DocRenderData * FromDocument(const CPDF_Document *pDoc)
RetainPtr< CPDF_Type3Cache > GetCachedType3(CPDF_Type3Font *pFont)
~CPDF_DocRenderData() override
CPDF_DocRenderData(const CPDF_DocRenderData &)=delete
RetainPtr< CPDF_Image > GetImage() const
bool StartGetCachedBitmap(RetainPtr< CPDF_Image > pImage, const CPDF_Dictionary *pFormResources, const CPDF_Dictionary *pPageResources, bool bStdCS, CPDF_ColorSpace::Family eFamily, bool bLoadMask, const CFX_Size &max_size_required)
bool Continue(PauseIndicatorIface *pPause)
static void Destroy()
static void Create()
virtual CPDF_ImageObject * AsImage()
static RetainPtr< IFX_SeekableReadStream > CreateFromFilename(const char *filename)
Definition fx_stream.cpp:68
static bool GetTestDataDir(std::string *path)
static std::string GetTestFilePath(const std::string &file_name)
static bool GetThirdPartyFilePath(const std::string &file_name, std::string *path)
static bool GetExecutableDir(std::string *path)
static bool GetSourceDir(std::string *path)
static bool DirectoryExists(const std::string &path)
static bool EndsWithSeparator(const std::string &path)
TEST(FXCRYPT, MD5GenerateEmtpyData)