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

Unified Diff: chrome/browser/ui/browser_command_controller_unittest.cc

Issue 888843005: Closing a guest session clears all browsing history. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CrOS passes Created 5 years, 10 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/browser_command_controller_browsertest.cc ('k') | chrome/browser/ui/browser_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_command_controller_unittest.cc
diff --git a/chrome/browser/ui/browser_command_controller_unittest.cc b/chrome/browser/ui/browser_command_controller_unittest.cc
index c70f664781399855f817ed6098c166bcb1030c0f..0242a0a75cd86c45232d3ed40bd0b019345b0b5e 100644
--- a/chrome/browser/ui/browser_command_controller_unittest.cc
+++ b/chrome/browser/ui/browser_command_controller_unittest.cc
@@ -236,45 +236,6 @@ TEST_F(BrowserCommandControllerTest, NewAvatarMenuEnabledWhenOnlyOneProfile) {
testing_profile_manager.DeleteTestingProfile("p1");
}
-TEST_F(BrowserCommandControllerTest, NewAvatarMenuEnabledInGuestMode) {
- if (!profiles::IsMultipleProfilesEnabled())
- return;
-
- // The command line is reset at the end of every test by the test suite.
- switches::EnableNewAvatarMenuForTesting(
- base::CommandLine::ForCurrentProcess());
-
- TestingProfileManager testing_profile_manager(
- TestingBrowserProcess::GetGlobal());
- ASSERT_TRUE(testing_profile_manager.SetUp());
-
- // Set up guest a profile.
- scoped_ptr<TestingProfile> original_profile =
- TestingProfile::Builder().Build();
- TestingProfile::Builder guest_builder;
- guest_builder.SetGuestSession();
- guest_builder.SetPath(ProfileManager::GetGuestProfilePath());
- // Browsers in Guest mode must be off the record profiles.
- TestingProfile* guest_profile =
- guest_builder.BuildIncognito(original_profile.get());
-
- ASSERT_TRUE(guest_profile->IsGuestSession());
-
- // Create a new browser based on the guest profile.
- Browser::CreateParams profile_params(guest_profile,
- chrome::GetActiveDesktop());
- scoped_ptr<Browser> guest_browser(
- chrome::CreateBrowserWithTestWindowForParams(&profile_params));
- chrome::BrowserCommandController command_controller(guest_browser.get());
- const CommandUpdater* command_updater = command_controller.command_updater();
-#if defined(OS_CHROMEOS)
- // Chrome OS uses system tray menu to handle multi-profiles.
- EXPECT_FALSE(command_updater->IsCommandEnabled(IDC_SHOW_AVATAR_MENU));
-#else
- EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_SHOW_AVATAR_MENU));
-#endif
-}
-
TEST_F(BrowserCommandControllerTest, AvatarMenuAlwaysDisabledInIncognitoMode) {
if (!profiles::IsMultipleProfilesEnabled())
return;
« no previous file with comments | « chrome/browser/ui/browser_command_controller_browsertest.cc ('k') | chrome/browser/ui/browser_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698