| Index: chrome/browser/ui/cocoa/profiles/user_manager_mac_unittest.mm
|
| diff --git a/chrome/browser/ui/cocoa/profiles/user_manager_mac_unittest.mm b/chrome/browser/ui/cocoa/profiles/user_manager_mac_unittest.mm
|
| index 4444f1f2f412ae82b68d3b2661684f84bc10031e..760adcb940d9e5b8996852669e315c09653bce0f 100644
|
| --- a/chrome/browser/ui/cocoa/profiles/user_manager_mac_unittest.mm
|
| +++ b/chrome/browser/ui/cocoa/profiles/user_manager_mac_unittest.mm
|
| @@ -4,9 +4,11 @@
|
|
|
| #include "chrome/browser/ui/cocoa/profiles/user_manager_mac.h"
|
|
|
| +#include "base/prefs/pref_service.h"
|
| #include "base/run_loop.h"
|
| #include "chrome/browser/profiles/profile_window.h"
|
| #include "chrome/browser/ui/user_manager.h"
|
| +#include "chrome/common/pref_names.h"
|
| #include "chrome/test/base/browser_with_test_window_test.h"
|
| #include "chrome/test/base/testing_browser_process.h"
|
| #include "chrome/test/base/testing_profile_manager.h"
|
| @@ -39,6 +41,13 @@ class UserManagerMacTest : public BrowserWithTestWindowTest {
|
| };
|
|
|
| TEST_F(UserManagerMacTest, ShowUserManager) {
|
| + // Set the ProfileLastUsed pref so that SetActiveProfileToGuestIfLocked()
|
| + // uses a last active profile that's in the ProfileInfoCache, not default.
|
| + g_browser_process->local_state()->SetString(
|
| + prefs::kProfileLastUsed,
|
| + g_browser_process->profile_manager()->GetProfileInfoCache().
|
| + GetPathOfProfileAtIndex(0).BaseName().MaybeAsASCII());
|
| +
|
| EXPECT_FALSE(UserManager::IsShowing());
|
| UserManager::Show(base::FilePath(),
|
| profiles::USER_MANAGER_NO_TUTORIAL,
|
|
|