diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-21 17:10:20 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-21 17:10:20 +0000 |
commit | 831fe580967810a1f4d0ac57f23aec56c82afd49 (patch) | |
tree | 9003698cfcc593ddd35d6d990d14ef1ec80f1ebe /chrome/test/ui/ui_test.h | |
parent | 0f43b4a799e778fac0ecb6bdb3a129096e156a90 (diff) | |
download | chromium_src-831fe580967810a1f4d0ac57f23aec56c82afd49.zip chromium_src-831fe580967810a1f4d0ac57f23aec56c82afd49.tar.gz chromium_src-831fe580967810a1f4d0ac57f23aec56c82afd49.tar.bz2 |
GTTF: Make ui_tests more reliable by using a temporary profile directory
for each test.
TEST=ui_tests
BUG=none
Review URL: http://codereview.chromium.org/2856047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53202 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui/ui_test.h')
-rw-r--r-- | chrome/test/ui/ui_test.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h index 783f637..859c2bb 100644 --- a/chrome/test/ui/ui_test.h +++ b/chrome/test/ui/ui_test.h @@ -36,6 +36,7 @@ class BrowserProxy; class DictionaryValue; class FilePath; class GURL; +class ScopedTempDir; class TabProxy; // Base class for UI Tests. This implements the core of the functions. @@ -398,7 +399,7 @@ class UITestBase { // Return the user data directory being used by the browser instance in // UITest::SetUp(). - FilePath user_data_dir() const { return user_data_dir_; } + FilePath user_data_dir() const; // Return the process id of the browser process (-1 on error). base::ProcessId browser_process_id() const { return process_id_; } @@ -565,7 +566,6 @@ class UITestBase { FilePath template_user_data_; // See set_template_user_data(). base::ProcessHandle process_; // Handle to the first Chrome process. base::ProcessId process_id_; // PID of |process_| (for debugging). - FilePath user_data_dir_; // User data directory used for the test static bool in_process_renderer_; // true if we're in single process mode bool show_window_; // Determines if the window is shown or // hidden. Defaults to hidden. @@ -618,6 +618,10 @@ class UITestBase { int terminate_timeout_ms_; std::wstring ui_test_name_; + + // We use a temporary directory for profile to avoid issues with being + // unable to delete some files because they're in use, etc. + scoped_ptr<ScopedTempDir> temp_profile_dir_; }; class UITest : public UITestBase, public PlatformTest { |