Index: chrome/browser/app_controller_mac_browsertest.mm |
diff --git a/chrome/browser/app_controller_mac_browsertest.mm b/chrome/browser/app_controller_mac_browsertest.mm |
index f8442c765f5f930221905f2775829d82b536a28c..8ad16ede2c7650dc12e0683b4ab91a03d7681907 100644 |
--- a/chrome/browser/app_controller_mac_browsertest.mm |
+++ b/chrome/browser/app_controller_mac_browsertest.mm |
@@ -278,6 +278,35 @@ IN_PROC_BROWSER_TEST_F(AppControllerNewProfileManagementBrowserTest, |
UserManager::Hide(); |
} |
+ |
noms (inactive)
2014/10/30 17:45:11
nit: is there an extra \n here?
Mike Lerman
2014/10/30 18:06:01
Done.
|
+IN_PROC_BROWSER_TEST_F(AppControllerNewProfileManagementBrowserTest, |
+ AboutChromeForcesUserManager) { |
+ base::scoped_nsobject<AppController> ac([[AppController alloc] init]); |
+ |
+ // Create the guest profile, and set it as the last used profile so the |
+ // app controller can use it on init. |
+ CreateAndWaitForGuestProfile(); |
+ PrefService* local_state = g_browser_process->local_state(); |
+ local_state->SetString(prefs::kProfileLastUsed, chrome::kGuestProfileDir); |
+ |
+ // Prohibiting guest mode forces the user manager flow for About Chrome. |
+ local_state->SetBoolean(prefs::kBrowserGuestModeEnabled, false); |
+ |
+ Profile* guest_profile = [ac lastProfile]; |
+ EXPECT_EQ(ProfileManager::GetGuestProfilePath(), guest_profile->GetPath()); |
+ EXPECT_TRUE(guest_profile->IsGuestSession()); |
+ |
+ // Tell the browser to open About Chrome |
noms (inactive)
2014/10/30 17:45:11
nit: comment should end in a .
Mike Lerman
2014/10/30 18:06:01
Done.
|
+ EXPECT_EQ(1u, active_browser_list_->size()); |
+ [ac orderFrontStandardAboutPanel:NSApp]; |
+ |
+ base::RunLoop().RunUntilIdle(); |
+ |
+ // No new browser is opened; the User Manager opens instead. |
+ EXPECT_EQ(1u, active_browser_list_->size()); |
+ EXPECT_TRUE(UserManager::IsShowing()); |
noms (inactive)
2014/10/30 17:45:11
I think you have to explicitly call UserManager::H
Mike Lerman
2014/10/30 18:06:01
Done.
|
+} |
+ |
class AppControllerOpenShortcutBrowserTest : public InProcessBrowserTest { |
protected: |
AppControllerOpenShortcutBrowserTest() { |
@@ -330,4 +359,5 @@ IN_PROC_BROWSER_TEST_F(AppControllerOpenShortcutBrowserTest, |
->GetLastCommittedURL()); |
} |
+ |
noms (inactive)
2014/10/30 17:45:11
nit: i think there's an extra \n?
Mike Lerman
2014/10/30 18:06:01
Done.
|
} // namespace |