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

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

Issue 181403006: Make TestingProfile auto-create incognito profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove broken and no-longer-applicable test Created 6 years, 9 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 bb93acc380bd18a4055e933bf545375174db8259..1f2e38517b6d6790f0fb983b5d0bd1e9a6b1381c 100644
--- a/chrome/browser/profiles/profile_manager_unittest.cc
+++ b/chrome/browser/profiles/profile_manager_unittest.cc
@@ -373,14 +373,6 @@ class UnittestGuestProfileManager : public UnittestProfileManager {
builder.SetGuestSession();
builder.SetPath(file_path);
TestingProfile* testing_profile = builder.Build().release();
-
- TestingProfile::Builder incognito_builder;
- incognito_builder.SetIncognito();
- incognito_builder.SetGuestSession();
- incognito_builder.SetPath(ProfileManager::GetGuestProfilePath());
- testing_profile->SetOffTheRecordProfile(
- incognito_builder.Build().PassAs<Profile>());
-
return testing_profile;
}
};
@@ -538,14 +530,6 @@ TEST_F(ProfileManagerTest, GetLastUsedProfileAllowedByPolicy) {
EXPECT_EQ(IncognitoModePrefs::ENABLED,
IncognitoModePrefs::GetAvailability(prefs));
- // Attach an incognito Profile to the TestingProfile.
- ASSERT_FALSE(profile->GetOffTheRecordProfile());
- TestingProfile::Builder builder;
- builder.SetIncognito();
- scoped_ptr<TestingProfile> incognito_profile = builder.Build();
- EXPECT_TRUE(incognito_profile->IsOffTheRecord());
- TestingProfile* testing_profile = static_cast<TestingProfile*>(profile);
- testing_profile->SetOffTheRecordProfile(incognito_profile.PassAs<Profile>());
ASSERT_TRUE(profile->GetOffTheRecordProfile());
IncognitoModePrefs::SetAvailability(prefs, IncognitoModePrefs::DISABLED);

Powered by Google App Engine
This is Rietveld 408576698