From f66c110c118bf7e5c386d49a5f4e83d948441b45 Mon Sep 17 00:00:00 2001 From: "erikkay@google.com" Date: Fri, 5 Dec 2008 20:26:29 +0000 Subject: fix chrome_paths to make some test dirs relative to base::DIR_SOURCE_ROOT rather than chrome::DIR_APP. DIR_APP is in different relative locations on different platforms while DIR_SOURCE_ROOT is the same, so this allows us to share code and be correct on all platforms. Also, enable extensions_service_unittest for Mac and Linux and add an NSAutoreleasePool to ChromeTestSuite (which is now being used by run_all_unittests on Mac and Linux per my earlier checkin). Review URL: http://codereview.chromium.org/13177 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6445 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/chrome_paths.cc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'chrome/common/chrome_paths.cc') diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc index 1ffaaf4..edb0d58 100644 --- a/chrome/common/chrome_paths.cc +++ b/chrome/common/chrome_paths.cc @@ -213,28 +213,26 @@ bool PathProvider(int key, FilePath* result) { // will fail if executed from an installed executable (because the // generated path won't exist). case chrome::DIR_TEST_DATA: - if (!PathService::Get(chrome::DIR_APP, &cur)) + if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur)) return false; - file_util::UpOneDirectory(&cur); + file_util::AppendToPath(&cur, L"chrome"); file_util::AppendToPath(&cur, L"test"); file_util::AppendToPath(&cur, L"data"); if (!file_util::PathExists(cur)) // we don't want to create this return false; break; case chrome::DIR_TEST_TOOLS: - if (!PathService::Get(chrome::DIR_APP, &cur)) + if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur)) return false; - file_util::UpOneDirectory(&cur); + file_util::AppendToPath(&cur, L"chrome"); file_util::AppendToPath(&cur, L"tools"); file_util::AppendToPath(&cur, L"test"); if (!file_util::PathExists(cur)) // we don't want to create this return false; break; case chrome::FILE_PYTHON_RUNTIME: - if (!PathService::Get(chrome::DIR_APP, &cur)) + if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur)) return false; - file_util::UpOneDirectory(&cur); // chrome - file_util::UpOneDirectory(&cur); file_util::AppendToPath(&cur, L"third_party"); file_util::AppendToPath(&cur, L"python_24"); file_util::AppendToPath(&cur, L"python.exe"); @@ -242,9 +240,9 @@ bool PathProvider(int key, FilePath* result) { return false; break; case chrome::FILE_TEST_SERVER: - if (!PathService::Get(chrome::DIR_APP, &cur)) + if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur)) return false; - file_util::UpOneDirectory(&cur); + file_util::AppendToPath(&cur, L"net"); file_util::AppendToPath(&cur, L"tools"); file_util::AppendToPath(&cur, L"test"); file_util::AppendToPath(&cur, L"testserver"); -- cgit v1.1