diff options
author | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-05 20:26:29 +0000 |
---|---|---|
committer | erikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-05 20:26:29 +0000 |
commit | f66c110c118bf7e5c386d49a5f4e83d948441b45 (patch) | |
tree | d052b77548d3c11450a7b886809aaf11c8f46a55 /chrome/common/chrome_paths.cc | |
parent | d8b258c5e97adbc8e73dd73b319d1cdacb4c15d7 (diff) | |
download | chromium_src-f66c110c118bf7e5c386d49a5f4e83d948441b45.zip chromium_src-f66c110c118bf7e5c386d49a5f4e83d948441b45.tar.gz chromium_src-f66c110c118bf7e5c386d49a5f4e83d948441b45.tar.bz2 |
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
Diffstat (limited to 'chrome/common/chrome_paths.cc')
-rw-r--r-- | chrome/common/chrome_paths.cc | 16 |
1 files changed, 7 insertions, 9 deletions
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"); |