Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1170)

Unified Diff: chrome/browser/profiles/profile_manager_unittest.cc

Issue 294033002: Multi-profile flag cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Return --test-type flag back to profile_manager_unittest.cc Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_manager_unittest.cc
diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc
index fb040c1cf5d128d9718364bb1bc035995d12e177..a0f1660238aba45a90dbf322455ce2a6b3010850 100644
--- a/chrome/browser/profiles/profile_manager_unittest.cc
+++ b/chrome/browser/profiles/profile_manager_unittest.cc
@@ -378,8 +378,7 @@ class UnittestGuestProfileManager : public UnittestProfileManager {
}
};
-class ProfileManagerGuestTest : public ProfileManagerTest,
- public testing::WithParamInterface<bool> {
+class ProfileManagerGuestTest : public ProfileManagerTest {
protected:
virtual void SetUp() {
// Create a new temporary directory, and store the path
@@ -389,17 +388,13 @@ class ProfileManagerGuestTest : public ProfileManagerTest,
#if defined(OS_CHROMEOS)
CommandLine* cl = CommandLine::ForCurrentProcess();
- if (GetParam())
- cl->AppendSwitch(switches::kMultiProfiles);
-
+ // This switch is needed to skip non-test specific behavior in
+ // ProfileManager (accessing DBusThreadManager).
cl->AppendSwitch(switches::kTestType);
- if (profiles::IsMultipleProfilesEnabled()) {
- cl->AppendSwitchASCII(chromeos::switches::kLoginProfile,
- std::string(chrome::kProfileDirPrefix) +
- chromeos::UserManager::kGuestUserName);
- } else {
- cl->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user");
- }
+
+ cl->AppendSwitchASCII(chromeos::switches::kLoginProfile,
+ std::string(chrome::kProfileDirPrefix) +
+ chromeos::UserManager::kGuestUserName);
cl->AppendSwitch(chromeos::switches::kGuestSession);
cl->AppendSwitch(::switches::kIncognito);
@@ -411,11 +406,7 @@ class ProfileManagerGuestTest : public ProfileManagerTest,
}
};
-INSTANTIATE_TEST_CASE_P(ProfileManagerGuestTestInstantiation,
- ProfileManagerGuestTest,
- testing::Bool());
-
-TEST_P(ProfileManagerGuestTest, GetLastUsedProfileAllowedByPolicy) {
+TEST_F(ProfileManagerGuestTest, GetLastUsedProfileAllowedByPolicy) {
ProfileManager* profile_manager = g_browser_process->profile_manager();
ASSERT_TRUE(profile_manager);
@@ -425,7 +416,7 @@ TEST_P(ProfileManagerGuestTest, GetLastUsedProfileAllowedByPolicy) {
}
#if defined(OS_CHROMEOS)
-TEST_P(ProfileManagerGuestTest, GuestProfileIngonito) {
+TEST_F(ProfileManagerGuestTest, GuestProfileIngonito) {
Profile* primary_profile = ProfileManager::GetPrimaryUserProfile();
EXPECT_TRUE(primary_profile->IsOffTheRecord());

Powered by Google App Engine
This is Rietveld 408576698