diff options
author | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 18:54:54 +0000 |
---|---|---|
committer | toyoshim@chromium.org <toyoshim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 18:54:54 +0000 |
commit | 967c43ce2e52c96fb6f3a5c878d2973c7bcf2fc1 (patch) | |
tree | bbbdb4330b0aa7de3f263efdf7b54af0ddae9217 /chrome/common | |
parent | 287416dfae42de0b012111699f48e23a6e2f598d (diff) | |
download | chromium_src-967c43ce2e52c96fb6f3a5c878d2973c7bcf2fc1.zip chromium_src-967c43ce2e52c96fb6f3a5c878d2973c7bcf2fc1.tar.gz chromium_src-967c43ce2e52c96fb6f3a5c878d2973c7bcf2fc1.tar.bz2 |
ui_tests and browser_tests use layout test data.
They are stored in chrome/test/data/layout_tests/LayoutTests in svn or old
git workflow. and in third_party/WebKit/LayoutTests in new git workflow.
This change adds new query key chrome::DIR_LAYOUT_TESTS to
PathService::Get(). Using this interface, each test easily get suitable path
for their layout tests.
BUG=105104
TEST=browser_tests; ui_tests
Review URL: http://codereview.chromium.org/8641002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111186 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/chrome_paths.cc | 13 | ||||
-rw-r--r-- | chrome/common/chrome_paths.h | 8 |
2 files changed, 21 insertions, 0 deletions
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc index 77d8d38..5af2ce3 100644 --- a/chrome/common/chrome_paths.cc +++ b/chrome/common/chrome_paths.cc @@ -305,6 +305,19 @@ bool PathProvider(int key, FilePath* result) { if (!file_util::PathExists(cur)) // We don't want to create this return false; break; + case chrome::DIR_LAYOUT_TESTS: + if (!PathService::Get(base::DIR_SOURCE_ROOT, &cur)) + return false; + cur = cur.Append(FILE_PATH_LITERAL("third_party")); + cur = cur.Append(FILE_PATH_LITERAL("WebKit")); + cur = cur.Append(FILE_PATH_LITERAL("LayoutTests")); + if (file_util::DirectoryExists(cur)) + break; + if (!PathService::Get(chrome::DIR_TEST_DATA, &cur)) + return false; + cur = cur.Append(FILE_PATH_LITERAL("layout_tests")); + cur = cur.Append(FILE_PATH_LITERAL("LayoutTests")); + break; #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) case chrome::DIR_POLICY_FILES: { #if defined(GOOGLE_CHROME_BUILD) diff --git a/chrome/common/chrome_paths.h b/chrome/common/chrome_paths.h index 4eeeaef..c6edfb3 100644 --- a/chrome/common/chrome_paths.h +++ b/chrome/common/chrome_paths.h @@ -100,6 +100,14 @@ enum { DIR_GEN_TEST_DATA, // Directory where generated test data resides. DIR_TEST_DATA, // Directory where unit test data resides. DIR_TEST_TOOLS, // Directory where unit test tools reside. + DIR_LAYOUT_TESTS, // Returns the LayoutTests path for layout + // tests. For the current git workflow, it + // returns + // third_party/WebKit/LayoutTests + // On svn workflow (including build machines) + // and older git workflow, it returns + // chrome/test/data/layout_tests/LayoutTests + // See, http://crbug.com/105104. PATH_END }; |