summaryrefslogtreecommitdiffstats
path: root/chrome/test/unit
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-09 18:26:23 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-09 18:26:23 +0000
commit76bb9c355cc9d34bc3d489125d9764598d533289 (patch)
treec5f2c9aabc98d2e024ce1e1f537b972a7044b131 /chrome/test/unit
parent5da7c2d76833bb8d1580a8c3e09849a876fea65d (diff)
downloadchromium_src-76bb9c355cc9d34bc3d489125d9764598d533289.zip
chromium_src-76bb9c355cc9d34bc3d489125d9764598d533289.tar.gz
chromium_src-76bb9c355cc9d34bc3d489125d9764598d533289.tar.bz2
Provide a method to specify to the automation interface the dir containing browser binaries
Problem: The automation proxy interface kinda assumes that the running binary would reside in the same directory as the browser binaries -- ie in Debug/Release dirs. While this works for all C++ binaries like ui_tests, startup_tests, this fails for pyauto tests since the running binary in this case is /usr/bin/python (or some such system path). This changeset lets pyauto explicitly specify the automation interface the dir in which to look for chromium binaries. Also, expose RunCommand method to pyauto. BUG=37730 TEST=pyauto scripts should work without having to copy python to Debug/Release dirs Review URL: http://codereview.chromium.org/695001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41051 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/unit')
-rw-r--r--chrome/test/unit/chrome_test_suite.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/test/unit/chrome_test_suite.h b/chrome/test/unit/chrome_test_suite.h
index 28f0b90..42f57b7 100644
--- a/chrome/test/unit/chrome_test_suite.h
+++ b/chrome/test/unit/chrome_test_suite.h
@@ -119,6 +119,9 @@ class ChromeTestSuite : public TestSuite {
if (!user_data_dir.empty())
PathService::Override(chrome::DIR_USER_DATA, user_data_dir);
+ if (!browser_dir_.empty())
+ PathService::Override(base::DIR_EXE, browser_dir_);
+
#if defined(OS_MACOSX)
// Look in the framework bundle for resources.
FilePath path;
@@ -166,11 +169,18 @@ class ChromeTestSuite : public TestSuite {
TestSuite::Shutdown();
}
+ void SetBrowserDirectory(const FilePath& browser_dir) {
+ browser_dir_ = browser_dir;
+ }
+
StatsTable* stats_table_;
// The name used for the stats file so it can be cleaned up on posix during
// test shutdown.
std::string stats_filename_;
+ // Alternative path to browser binaries.
+ FilePath browser_dir_;
+
ScopedOleInitializer ole_initializer_;
scoped_refptr<WarningHostResolverProc> host_resolver_proc_;
net::ScopedDefaultHostResolverProc scoped_host_resolver_proc_;