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

Unified Diff: chrome/browser/ui/bookmarks/bookmark_context_menu_controller_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
Index: chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
diff --git a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
index 5206a3e576bdc904a0d5e22de8d5634ef97eaaf8..2d64f64ff896dc8e8eff5290e1250fc4cbdcf241 100644
--- a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
@@ -240,14 +240,8 @@ TEST_F(BookmarkContextMenuControllerTest, MultipleFoldersWithURLs) {
// Tests the enabled state of open incognito.
TEST_F(BookmarkContextMenuControllerTest, DisableIncognito) {
- // Create an incognito Profile. It must be associated with the original
- // Profile, so that GetOriginalProfile() works as expected.
- TestingProfile::Builder builder;
- builder.SetIncognito();
- scoped_ptr<TestingProfile> testing_incognito = builder.Build();
- testing_incognito->SetOriginalProfile(profile_.get());
- TestingProfile* incognito = testing_incognito.get();
- profile_->SetOffTheRecordProfile(testing_incognito.PassAs<Profile>());
+ TestingProfile* incognito =
+ TestingProfile::Builder().BuildIncognito(profile_.get());
incognito->CreateBookmarkModel(true);
BookmarkModel* model = BookmarkModelFactory::GetForProfile(incognito);
« no previous file with comments | « chrome/browser/ui/autofill/account_chooser_model_unittest.cc ('k') | chrome/browser/ui/browser_command_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698