summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-31 17:03:48 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-31 17:03:48 +0000
commit49a2563a2fd3c7a337f60c7df5e9c86b8dea946d (patch)
tree38f93a24ade006a278debd0f9cd762b1495fce5f /chrome_frame/test
parent101488068d95c5f2fd64fbb0b0f70b5de0c6bae3 (diff)
downloadchromium_src-49a2563a2fd3c7a337f60c7df5e9c86b8dea946d.zip
chromium_src-49a2563a2fd3c7a337f60c7df5e9c86b8dea946d.tar.gz
chromium_src-49a2563a2fd3c7a337f60c7df5e9c86b8dea946d.tar.bz2
Revamp the multi-profiles testing infrastructure.
This creates TestingProfileManager to handle setting up the structures needed to test multi-profiles in unit_tests. It requires there to be a TestingBrowserProcess in place. This also adds a second constructor to TestingProfile for multi-profiles testing. BUG=none TEST=unit_tests Review URL: http://codereview.chromium.org/7748002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98991 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test')
-rw-r--r--chrome_frame/test/net/fake_external_tab.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc
index 3399c12..319f452 100644
--- a/chrome_frame/test/net/fake_external_tab.cc
+++ b/chrome_frame/test/net/fake_external_tab.cc
@@ -16,6 +16,7 @@
#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
+#include "base/scoped_temp_dir.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/system_monitor/system_monitor.h"
@@ -110,11 +111,15 @@ bool SetFocusToAccessibleWindow(HWND hwnd) {
class FakeBrowserProcessImpl : public BrowserProcessImpl {
public:
explicit FakeBrowserProcessImpl(const CommandLine& command_line)
- : BrowserProcessImpl(command_line) {}
+ : BrowserProcessImpl(command_line) {
+ profiles_dir_.CreateUniqueTempDir();
+ }
virtual ProfileManager* profile_manager() {
- if (!profile_manager_.get())
- profile_manager_.reset(new ProfileManagerWithoutInit);
+ if (!profile_manager_.get()) {
+ profile_manager_.reset(
+ new ProfileManagerWithoutInit(profiles_dir_.path()));
+ }
return profile_manager_.get();
}
@@ -123,6 +128,7 @@ class FakeBrowserProcessImpl : public BrowserProcessImpl {
}
private:
+ ScopedTempDir profiles_dir_;
scoped_ptr<ProfileManager> profile_manager_;
};