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

Unified Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc

Issue 556173002: Ensure incognito TestingProfiles are incognito for their whole lifetime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: respond to comments Created 6 years, 3 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 | « no previous file | chrome/browser/chromeos/power/power_prefs_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc
diff --git a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc
index 6ddccc6b1cf5d8249fc056885ba7468614dec873..4490749f4981e0b1baf60aa2ada96eb6e1040fd9 100644
--- a/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc
+++ b/chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc
@@ -99,13 +99,10 @@ class UserCloudPolicyManagerChromeOSTest : public testing::Test {
0,
std::string(),
factories);
- signin_profile_ = profile_manager_->CreateTestingProfile(kSigninProfile);
- signin_profile_->ForceIncognito(true);
// Usually the signin Profile and the main Profile are separate, but since
// the signin Profile is an OTR Profile then for this test it suffices to
// attach it to the main Profile.
- profile_->SetOffTheRecordProfile(scoped_ptr<Profile>(signin_profile_));
- signin_profile_->SetOriginalProfile(profile_);
+ signin_profile_ = TestingProfile::Builder().BuildIncognito(profile_);
ASSERT_EQ(signin_profile_, chromeos::ProfileHelper::GetSigninProfile());
chrome::RegisterLocalState(prefs_.registry());
@@ -156,7 +153,6 @@ class UserCloudPolicyManagerChromeOSTest : public testing::Test {
}
signin_profile_ = NULL;
profile_ = NULL;
- profile_manager_->DeleteTestingProfile(kSigninProfile);
profile_manager_->DeleteTestingProfile(chrome::kInitialProfile);
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/power/power_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698