Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(789)

Unified Diff: chrome/common/chrome_paths.cc

Issue 8333013: Allow generator javascript test files to go anywhere in the source tree (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Nits. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/test/data/webui/options.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_paths.cc
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index cfd605877752620980cf158d23f710ad72b7e572..eff54b380754e63792c58c01de91028dc7b86d48 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -280,13 +280,20 @@ bool PathProvider(int key, FilePath* result) {
// The following are only valid in the development environment, and
// will fail if executed from an installed executable (because the
// generated path won't exist).
+ case chrome::DIR_GEN_TEST_DATA:
+ if (!PathService::Get(base::DIR_MODULE, &cur))
+ return false;
+ cur = cur.Append(FILE_PATH_LITERAL("test_data"));
+ if (!file_util::PathExists(cur)) // We don't want to create this.
+ return false;
+ break;
case chrome::DIR_TEST_DATA:
if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur))
return false;
cur = cur.Append(FILE_PATH_LITERAL("chrome"));
cur = cur.Append(FILE_PATH_LITERAL("test"));
cur = cur.Append(FILE_PATH_LITERAL("data"));
- if (!file_util::PathExists(cur)) // we don't want to create this
+ if (!file_util::PathExists(cur)) // We don't want to create this.
return false;
break;
case chrome::DIR_TEST_TOOLS:
@@ -295,7 +302,7 @@ bool PathProvider(int key, FilePath* result) {
cur = cur.Append(FILE_PATH_LITERAL("chrome"));
cur = cur.Append(FILE_PATH_LITERAL("tools"));
cur = cur.Append(FILE_PATH_LITERAL("test"));
- if (!file_util::PathExists(cur)) // we don't want to create this
+ if (!file_util::PathExists(cur)) // We don't want to create this
return false;
break;
#if defined(OS_POSIX) && !defined(OS_MACOSX)
@@ -317,7 +324,7 @@ bool PathProvider(int key, FilePath* result) {
if (!login)
return false;
cur = cur.AppendASCII(login);
- if (!file_util::PathExists(cur)) // we don't want to create this
+ if (!file_util::PathExists(cur)) // We don't want to create this.
return false;
break;
}
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/test/data/webui/options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698