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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_context_menu_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 | « chrome/browser/ui/sync/one_click_signin_helper_unittest.cc ('k') | chrome/test/base/testing_profile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/bookmarks/bookmark_context_menu_unittest.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_context_menu_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_context_menu_unittest.cc
index 0d008b4f74ef578998fc666dbce62e533cd77f27..6c01c08a5594d6e45cd1ed725b7320ad11012209 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_context_menu_unittest.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_context_menu_unittest.cc
@@ -270,12 +270,9 @@ TEST_F(BookmarkContextMenuTest, MultipleFoldersWithURLs) {
TEST_F(BookmarkContextMenuTest, DisableIncognito) {
std::vector<const BookmarkNode*> nodes;
nodes.push_back(model_->bookmark_bar_node()->GetChild(0));
- TestingProfile::Builder builder;
- builder.SetIncognito();
- scoped_ptr<TestingProfile> incognito_ = builder.Build().Pass();
- incognito_->SetOriginalProfile(profile_.get());
+ Profile* incognito = profile_->GetOffTheRecordProfile();
BookmarkContextMenu controller(
- NULL, NULL, incognito_.get(), NULL, nodes[0]->parent(), nodes, false);
+ NULL, NULL, incognito, NULL, nodes[0]->parent(), nodes, false);
EXPECT_FALSE(controller.IsCommandEnabled(IDC_BOOKMARK_BAR_OPEN_INCOGNITO));
EXPECT_FALSE(
controller.IsCommandEnabled(IDC_BOOKMARK_BAR_OPEN_ALL_INCOGNITO));
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper_unittest.cc ('k') | chrome/test/base/testing_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698