Index: chrome/browser/profiles/profile_manager_unittest.cc |
diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc |
index 7dd3c1f86d505e8453e338943658de3922d0d271..8df5a4999f6a4ef7fa71da98cb95b04b596d33f8 100644 |
--- a/chrome/browser/profiles/profile_manager_unittest.cc |
+++ b/chrome/browser/profiles/profile_manager_unittest.cc |
@@ -39,6 +39,7 @@ |
#if defined(OS_CHROMEOS) |
#include "chrome/browser/chromeos/cros/cros_library.h" |
+#include "chrome/browser/chromeos/login/mock_user_manager.h" |
#include "chromeos/chromeos_switches.h" |
#endif |
@@ -175,9 +176,13 @@ TEST_F(ProfileManagerTest, LoggedInProfileDir) { |
EXPECT_EQ(expected_default.value(), |
profile_manager->GetInitialProfileDir().value()); |
+ scoped_ptr<chromeos::MockUserManager> mock_user_manager; |
+ mock_user_manager.reset(new chromeos::MockUserManager()); |
+ mock_user_manager->SetActiveUser("user@gmail.com"); |
+ chromeos::User* active_user = mock_user_manager->GetActiveUser(); |
profile_manager->Observe(chrome::NOTIFICATION_LOGIN_USER_CHANGED, |
content::NotificationService::AllSources(), |
- content::NotificationService::NoDetails()); |
+ content::Details<const chromeos::User>(active_user)); |
base::FilePath expected_logged_in(profile_dir); |
EXPECT_EQ(expected_logged_in.value(), |
profile_manager->GetInitialProfileDir().value()); |