#include "ios/chrome/browser/download/model/download_test_util.h"
#include "base/base_paths.h"
#include "base/check.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
namespace testing {
std::string GetTestFileContents(base::FilePath::StringViewType file_path) {
std::string contents;
const base::FilePath full_path =
base::PathService::CheckedGet(base::DIR_ASSETS).Append(file_path);
const bool success = base::ReadFileToString(full_path, &contents);
CHECK(success) << "failed to read file: " << full_path;
return contents;
}
}