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

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

Issue 9420036: Also delay regular profile destruction... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Merge Goof fix... Created 8 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
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2644176d698d5dc30f0b472fd33ec4b9baf948ef..79d5a9cef07c74e1b33bfdf8dd34266de3dfdc0c 100644
--- a/chrome/browser/profiles/profile_manager_unittest.cc
+++ b/chrome/browser/profiles/profile_manager_unittest.cc
@@ -503,13 +503,16 @@ TEST_F(ProfileManagerTest, LastOpenedProfilesDoesNotContainIncognito) {
ProfileManager* profile_manager = g_browser_process->profile_manager();
// Successfully create the profiles.
- Profile* profile1 = profile_manager->GetProfile(dest_path1);
+ TestingProfile* profile1 =
+ static_cast<TestingProfile*>(profile_manager->GetProfile(dest_path1));
ASSERT_TRUE(profile1);
- TestingProfile* profile2 =
- static_cast<TestingProfile*>(profile_manager->GetProfile(dest_path2));
+ // incognito profiles should not be managed by the profile manager but by the
+ // original profile.
+ TestingProfile* profile2 = new TestingProfile();
ASSERT_TRUE(profile2);
profile2->set_incognito(true);
+ profile1->SetOffTheRecordProfile(profile2);
std::vector<Profile*> last_opened_profiles =
profile_manager->GetLastOpenedProfiles();
« no previous file with comments | « chrome/browser/profiles/profile_manager.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698