Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: testing/utils/path_service.h

Issue 1411403012: Merge to XFA: Add path service to retrieve test data directory at run time so tests can be run from… (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: remove a blank line Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « testing/test_support.cpp ('k') | testing/utils/path_service.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 PDFium Authors. All rights reserved.
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.
17 class PathService {
18 public:
19 // Return true when the path ends with a path separator.
20 static bool EndsWithSeparator(const std::string& path);
21
22 // Retrieve the directory where executables run from.
23 static bool GetExecutableDir(std::string* path);
24
25 // Retrieve the root directory of the source tree.
26 // Assume executables always run from out/<Debug|Release>/, the source
27 // directory is two levels above the executable directory.
28 static bool GetSourceDir(std::string* path);
29
30 // Retrieve the test data directory where test files are stored.
31 // Currently, the test dir is under <source_dir>/testing/resources/.
32 static bool GetTestDataDir(std::string* path);
33
34 // Get the full path for a test file under the test data directory.
35 static bool GetTestFilePath(const std::string& file_name, std::string* path);
36 };
37 #endif // TESTING_UTILS_PATH_SERVICE_H_
OLDNEW
« no previous file with comments | « testing/test_support.cpp ('k') | testing/utils/path_service.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698