This source file includes following definitions.
- GetTestCertsDirectory
- GetTestClientCertsDirectory
- GetWebSocketTestDataDirectory
#include "net/base/test_data_directory.h"
#include "base/base_paths.h"
#include "base/path_service.h"
namespace net {
namespace {
const base::FilePath::CharType kCertificateRelativePath[] =
FILE_PATH_LITERAL("net/data/ssl/certificates");
}
base::FilePath GetTestCertsDirectory() {
base::FilePath src_root;
PathService::Get(base::DIR_SOURCE_ROOT, &src_root);
return src_root.Append(kCertificateRelativePath);
}
base::FilePath GetTestClientCertsDirectory() {
#if defined(OS_ANDROID)
return base::FilePath(kCertificateRelativePath);
#else
return GetTestCertsDirectory();
#endif
}
base::FilePath GetWebSocketTestDataDirectory() {
base::FilePath data_dir(FILE_PATH_LITERAL("net/data/websocket"));
return data_dir;
}
}