0

[base] Rename DIR_SOURCE_ROOT to DIR_SRC_TEST_DATA_ROOT

Bug: 1264897
Change-Id: I8946189f4cf2ad19dfd6cc73df97cbd645e2d417
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4952181
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ho Cheung <uioptt24@gmail.com>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1212132}
This commit is contained in:
Ho Cheung
2023-10-19 14:05:38 +00:00
committed by Chromium LUCI CQ
parent 4eda51ae44
commit e63a0e8aaf
11 changed files with 16 additions and 11 deletions

@ -8,7 +8,7 @@
#include "base/path_service.h"
void BaseTest::SetUp() {
ASSERT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &test_dir_));
ASSERT_TRUE(base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &test_dir_));
test_dir_ = test_dir_.AppendASCII("courgette");
test_dir_ = test_dir_.AppendASCII("testdata");
}

@ -140,7 +140,8 @@ using IndexedRulesetFormatVersionTest = ::testing::Test;
// schema is modified.
TEST_F(IndexedRulesetFormatVersionTest, CheckVersionUpdated) {
base::FilePath source_root;
ASSERT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &source_root));
ASSERT_TRUE(
base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &source_root));
base::FilePath flatbuffer_schema_path = source_root.AppendASCII(
"extensions/browser/api/declarative_net_request/flat/"

@ -29,7 +29,7 @@ TEST(ExtensionEventHistogramValueTest, CheckEnums) {
EXPECT_EQ(events::ENUM_BOUNDARY, enums->size());
base::FilePath src_root;
ASSERT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &src_root));
ASSERT_TRUE(base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &src_root));
base::FilePath event_histogram_value =
src_root.AppendASCII("extensions")
.AppendASCII("browser")

@ -27,7 +27,7 @@ TEST(ExtensionFunctionHistogramValueTest, CheckEnums) {
EXPECT_EQ(enums->size(), functions::ENUM_BOUNDARY);
base::FilePath src_root;
ASSERT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &src_root));
ASSERT_TRUE(base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &src_root));
base::FilePath function_histogram_value =
src_root.AppendASCII("extensions")
.AppendASCII("browser")

@ -13,8 +13,9 @@ bool PathProvider(int key, base::FilePath* result) {
if (key != DIR_TEST_DATA)
return false;
base::FilePath cur;
if (!base::PathService::Get(base::DIR_SOURCE_ROOT, &cur))
if (!base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &cur)) {
return false;
}
cur = cur.Append(FILE_PATH_LITERAL("extensions"));
cur = cur.Append(FILE_PATH_LITERAL("test"));
cur = cur.Append(FILE_PATH_LITERAL("data"));

@ -32,7 +32,7 @@ TEST(ExtensionAPIPermissionTest, CheckEnums) {
static_cast<size_t>(mojom::APIPermissionID::kMaxValue) + 1);
base::FilePath src_root;
ASSERT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &src_root));
ASSERT_TRUE(base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &src_root));
base::FilePath permission_histogram_value =
src_root.AppendASCII("extensions")
.AppendASCII("common")

@ -22,7 +22,7 @@ base::FilePath GinShellPath() {
base::FilePath HelloWorldPath() {
base::FilePath path;
base::PathService::Get(base::DIR_SOURCE_ROOT, &path);
base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &path);
return path
.AppendASCII("gin")
.AppendASCII("shell")

@ -33,8 +33,9 @@ bool RemovePrefix(const std::string& input,
base::FilePath GetTestFilePath(const std::string& relative_path) {
base::FilePath path;
if (!base::PathService::Get(base::DIR_SOURCE_ROOT, &path))
if (!base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &path)) {
return base::FilePath();
}
path = path.AppendASCII("google_apis")
.AppendASCII("test")
.AppendASCII("data")

@ -203,7 +203,7 @@ FakeGaia::SyncTrustedVaultKeys::~SyncTrustedVaultKeys() = default;
FakeGaia::FakeGaia() : issue_oauth_code_cookie_(false) {
base::FilePath source_root_dir;
base::PathService::Get(base::DIR_SOURCE_ROOT, &source_root_dir);
base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &source_root_dir);
CHECK(base::ReadFileToString(
source_root_dir.Append(base::FilePath(kEmbeddedSetupChromeos)),
&embedded_setup_chromeos_response_));

@ -33,8 +33,9 @@ const char kSigninChromeSyncKeysPlatformSuffix[] = "desktop";
base::FilePath GetTestFilePath(const std::string& relative_path) {
base::FilePath path;
if (!base::PathService::Get(base::DIR_SOURCE_ROOT, &path))
if (!base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &path)) {
return base::FilePath();
}
return path.AppendASCII("google_apis")
.AppendASCII("test")
.AppendASCII("data")

@ -92,8 +92,9 @@ static const char kDummyToken[] = "dummytoken";
base::FilePath GetTestFilePath(const std::string& relative_path) {
base::FilePath path;
if (!base::PathService::Get(base::DIR_SOURCE_ROOT, &path))
if (!base::PathService::Get(base::DIR_SRC_TEST_DATA_ROOT, &path)) {
return base::FilePath();
}
return path.AppendASCII("google_apis")
.AppendASCII("test")
.AppendASCII("data")