summaryrefslogtreecommitdiffstats
path: root/chrome/test/ui
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-17 21:04:18 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-17 21:04:18 +0000
commitb94724ed2d21cae98a0f15ae35a23ae45898b4b7 (patch)
tree6b4331da5a26c7073c34a19d9bdd045bc2f308af /chrome/test/ui
parent428c0f261b9fd5aa5435050131a440c6a6ed2fd6 (diff)
downloadchromium_src-b94724ed2d21cae98a0f15ae35a23ae45898b4b7.zip
chromium_src-b94724ed2d21cae98a0f15ae35a23ae45898b4b7.tar.gz
chromium_src-b94724ed2d21cae98a0f15ae35a23ae45898b4b7.tar.bz2
PyAuto: Flags to forbid cleaning profile dir
Several tests require quitting/killing chromium to test features like restore. In addition, one might want to use pyauto on an existing profile. This CL lets pyauto work without cleaning the profile dir. Also lets specify the homepage to use. Example: Running this test with CHROME_UI_TESTS_USER_DATA_DIR pointing to a profile dir will run my script with the given dir as the user-data-dir without cleaning it up, and also specifies the homepage to use. class A(PyUITest): def __init__(self, methodName): PyUITest.__init__(self, methodName, clear_profile=False, homepage="http://www.cnn.com") def testA(self): pass BUG=None TEST=None Review URL: http://codereview.chromium.org/1007007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41878 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui')
-rw-r--r--chrome/test/ui/ui_test.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h
index 56c7e9c..334e8b2 100644
--- a/chrome/test/ui/ui_test.h
+++ b/chrome/test/ui/ui_test.h
@@ -435,6 +435,18 @@ class UITestBase {
ui_test_name_ = name;
}
+ // Sets clear_profile_. Should be called before launching browser to have
+ // any effect.
+ void set_clear_profile(bool clear_profile) {
+ clear_profile_ = clear_profile;
+ }
+
+ // Sets homepage_. Should be called before launching browser to have
+ // any effect.
+ void set_homepage(const std::wstring& homepage) {
+ homepage_ = homepage;
+ }
+
// Count the number of active browser processes launched by this test.
// The count includes browser sub-processes.
int GetBrowserProcessCount();