Lines Matching refs:path
36 // Convenience macro to create a file path from a string literal.
37 #define FP(path) base::FilePath(FILE_PATH_LITERAL(path))
48 for (base::FilePath path = files.Next(); !path.empty(); path = files.Next()) {
50 EXPECT_TRUE(dir.AppendRelativePath(path, &relative));
163 for (const base::FilePath& path : paths) {
164 const auto it = files_.find(path);
176 bool List(const base::FilePath& path,
179 DCHECK(!path.IsAbsolute());
183 const auto it = file_tree_.find(path);
200 bool GetInfo(const base::FilePath& path, Info* const info) override {
201 DCHECK(!path.IsAbsolute());
204 if (!file_tree_.count(path))
207 info->is_directory = !files_.count(path);
258 base::FilePath path;
259 bool success = base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &path);
261 return std::move(path)
274 void TestUnzipFile(const base::FilePath& path, bool expect_hidden_files) {
275 ASSERT_TRUE(base::PathExists(path)) << "no file " << path;
276 ASSERT_TRUE(zip::Unzip(path, test_dir_));
297 << "Cannot append relative path failed, params: '" << test_dir_
308 for (const base::FilePath& path : zip_contents_) {
309 if (expect_hidden_files || path.BaseName().value()[0] != '.')
369 // The path to temporary directory used to contain the test operations.
401 base::FilePath path = GetDataDirectory().AppendASCII("evil.zip");
406 EXPECT_TRUE(zip::Unzip(path, output_dir));
413 base::FilePath path =
417 ASSERT_TRUE(zip::Unzip(path, output_dir));
424 auto filter = base::BindRepeating([](const base::FilePath& path) {
425 return path.BaseName().MaybeAsASCII() == "foo.txt";
440 auto filter = base::BindRepeating([](const base::FilePath& path) {
441 return !base::StartsWith(path.MaybeAsASCII(), "Encrypted AES");
460 auto filter = base::BindRepeating([](const base::FilePath& path) {
461 return !base::StartsWith(path.MaybeAsASCII(), "Encrypted AES");
481 auto filter = base::BindRepeating([](const base::FilePath& path) {
482 return !base::StartsWith(path.MaybeAsASCII(), "Encrypted AES");
646 for (const std::string& path : got_paths) {
647 const bool ok = want_paths.erase(path);
654 LOG(WARNING) << "Found unexpected file: " << std::quoted(path);
658 EXPECT_TRUE(ok) << "Found unexpected file: " << std::quoted(path);
662 EXPECT_TRUE(base::ReadFileToString(test_dir_.AppendASCII(path), &contents));
663 EXPECT_EQ(base::StrCat({"This is: ", path}), contents);
666 for (const std::string& path : want_paths) {
667 EXPECT_TRUE(false) << "Cannot find expected file: " << std::quoted(path);
861 for (const std::string& path : got_paths) {
862 const bool ok = want_paths.erase(path);
867 LOG_IF(WARNING, !ok) << "Found unexpected file: " << std::quoted(path);
869 EXPECT_TRUE(ok) << "Found unexpected file: " << std::quoted(path);
873 for (const std::string& path : want_paths) {
874 EXPECT_TRUE(false) << "Cannot find expected file: " << std::quoted(path);
1090 EXPECT_EQ(entry->path, zip_file_list_[i]);
1414 EXPECT_EQ(FP("src.zip"), entry->path);