summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile_manager_unittest.cc
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-30 21:18:51 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-30 21:18:51 +0000
commit9acc48601ea4aff4e5ec977c0dd089e887ba5ffd (patch)
tree9c0ef6715ab756b6c8eafb5f4385eaab73a3a8ab /chrome/browser/profile_manager_unittest.cc
parent8d7690b29c0572c62bbe72817ac3b5195bf38e42 (diff)
downloadchromium_src-9acc48601ea4aff4e5ec977c0dd089e887ba5ffd.zip
chromium_src-9acc48601ea4aff4e5ec977c0dd089e887ba5ffd.tar.gz
chromium_src-9acc48601ea4aff4e5ec977c0dd089e887ba5ffd.tar.bz2
Add -profile command line switch
Review URL: http://codereview.chromium.org/384062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33335 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile_manager_unittest.cc')
-rw-r--r--chrome/browser/profile_manager_unittest.cc34
1 files changed, 4 insertions, 30 deletions
diff --git a/chrome/browser/profile_manager_unittest.cc b/chrome/browser/profile_manager_unittest.cc
index b4f328ed..e38e68f 100644
--- a/chrome/browser/profile_manager_unittest.cc
+++ b/chrome/browser/profile_manager_unittest.cc
@@ -35,22 +35,6 @@ class ProfileManagerTest : public testing::Test {
FilePath test_dir_;
};
-TEST_F(ProfileManagerTest, CopyProfileData) {
- FilePath source_path;
- PathService::Get(chrome::DIR_TEST_DATA, &source_path);
- source_path = source_path.Append(FILE_PATH_LITERAL("profiles"));
-
- ASSERT_FALSE(ProfileManager::IsProfile(source_path));
- source_path = source_path.Append(FILE_PATH_LITERAL("sample"));
- ASSERT_TRUE(ProfileManager::IsProfile(source_path));
-
- FilePath dest_path = test_dir_;
- dest_path = dest_path.Append(FILE_PATH_LITERAL("profile_copy"));
- ASSERT_FALSE(ProfileManager::IsProfile(dest_path));
- ASSERT_TRUE(ProfileManager::CopyProfileData(source_path, dest_path));
- ASSERT_TRUE(ProfileManager::IsProfile(dest_path));
-}
-
TEST_F(ProfileManagerTest, CreateProfile) {
FilePath source_path;
PathService::Get(chrome::DIR_TEST_DATA, &source_path);
@@ -63,13 +47,9 @@ TEST_F(ProfileManagerTest, CreateProfile) {
scoped_ptr<Profile> profile;
// Successfully create a profile.
- profile.reset(ProfileManager::CreateProfile(dest_path, L"New Profile", L"",
- L"new-profile"));
+ profile.reset(ProfileManager::CreateProfile(dest_path));
ASSERT_TRUE(profile.get());
- PrefService* prefs = profile->GetPrefs();
- ASSERT_EQ(L"New Profile", prefs->GetString(prefs::kProfileName));
- ASSERT_EQ(L"new-profile", prefs->GetString(prefs::kProfileID));
profile.reset();
#ifdef NDEBUG
@@ -77,12 +57,8 @@ TEST_F(ProfileManagerTest, CreateProfile) {
// these cases would trigger DCHECKs.
// The profile already exists when we call CreateProfile. Just load it.
- profile.reset(ProfileManager::CreateProfile(dest_path, L"New Profile", L"",
- L"new-profile"));
+ profile.reset(ProfileManager::CreateProfile(dest_path));
ASSERT_TRUE(profile.get());
- prefs = profile->GetPrefs();
- ASSERT_EQ(L"New Profile", prefs->GetString(prefs::kProfileName));
- ASSERT_EQ(L"new-profile", prefs->GetString(prefs::kProfileID));
#endif
}
@@ -104,12 +80,10 @@ TEST_F(ProfileManagerTest, DISABLED_CreateAndUseTwoProfiles) {
scoped_ptr<Profile> profile2;
// Successfully create the profiles.
- profile1.reset(ProfileManager::CreateProfile(dest_path1, L"New Profile 1",
- L"", L"new-profile-1"));
+ profile1.reset(ProfileManager::CreateProfile(dest_path1));
ASSERT_TRUE(profile1.get());
- profile2.reset(ProfileManager::CreateProfile(dest_path2, L"New Profile 2",
- L"", L"new-profile-2"));
+ profile2.reset(ProfileManager::CreateProfile(dest_path2));
ASSERT_TRUE(profile2.get());
// Force lazy-init of some profile services to simulate use.