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

Unified Diff: chrome/browser/signin/signin_error_notifier_ash_unittest.cc

Issue 1984733002: [Reland] GetAccountIdFromProfile() should not return an empty account id if a valid profile is prov… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: chrome/browser/signin/signin_error_notifier_ash_unittest.cc
diff --git a/chrome/browser/signin/signin_error_notifier_ash_unittest.cc b/chrome/browser/signin/signin_error_notifier_ash_unittest.cc
index bd0fada6f5353a063553b7fc1c415a709119612b..f880440fd4f22490f7df7ece90ccbd8c0a978261 100644
--- a/chrome/browser/signin/signin_error_notifier_ash_unittest.cc
+++ b/chrome/browser/signin/signin_error_notifier_ash_unittest.cc
@@ -34,6 +34,11 @@
#include "ui/display/screen.h"
#endif
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/login/users/mock_user_manager.h"
+#include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h"
+#endif
+
namespace ash {
namespace test {
@@ -61,6 +66,12 @@ class SigninErrorNotifierTest : public AshTestBase {
new TestingProfileManager(TestingBrowserProcess::GetGlobal()));
ASSERT_TRUE(profile_manager_->SetUp());
+#if defined(OS_CHROMEOS)
+ mock_user_manager_ = new chromeos::MockUserManager();
+ user_manager_enabler_.reset(
+ new chromeos::ScopedUserManagerEnabler(mock_user_manager_));
+#endif
+
TestingBrowserProcess::GetGlobal();
AshTestBase::SetUp();
@@ -103,6 +114,10 @@ class SigninErrorNotifierTest : public AshTestBase {
std::unique_ptr<TestingProfile> profile_;
SigninErrorController* error_controller_;
NotificationUIManager* notification_ui_manager_;
+#if defined(OS_CHROMEOS)
+ chromeos::MockUserManager* mock_user_manager_; // Not owned.
+ std::unique_ptr<chromeos::ScopedUserManagerEnabler> user_manager_enabler_;
+#endif
};
TEST_F(SigninErrorNotifierTest, NoErrorAuthStatusProviders) {
« no previous file with comments | « chrome/browser/chromeos/profiles/profile_helper.h ('k') | chrome/browser/sync/sync_error_notifier_ash_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698