| Index: chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
|
| diff --git a/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm b/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
|
| index a266e033d70d9a93cbae5cc04d9e0cf74c57e13d..9c5fd8ade546cc6d734e595ecebd8b3fbadffe78 100644
|
| --- a/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
|
| +++ b/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
|
| @@ -10,6 +10,7 @@
|
| #include "base/utf_string_conversions.h"
|
| #include "chrome/app/chrome_command_ids.h"
|
| #include "chrome/browser/prefs/pref_service.h"
|
| +#include "chrome/browser/signin/fake_auth_status_provider.h"
|
| #include "chrome/browser/signin/signin_global_error.h"
|
| #include "chrome/browser/signin/signin_manager.h"
|
| #include "chrome/browser/signin/signin_manager_fake.h"
|
| @@ -36,24 +37,6 @@
|
|
|
| using ::testing::Return;
|
|
|
| -namespace {
|
| -class FakeAuthStatusProvider : public SigninGlobalError::AuthStatusProvider {
|
| - public:
|
| - FakeAuthStatusProvider() : auth_error_(GoogleServiceAuthError::None()) {}
|
| -
|
| - // AuthStatusProvider implementation.
|
| - GoogleServiceAuthError GetAuthStatus() const OVERRIDE { return auth_error_; }
|
| -
|
| - void set_auth_error(const GoogleServiceAuthError& error) {
|
| - auth_error_ = error;
|
| - }
|
| -
|
| - private:
|
| - GoogleServiceAuthError auth_error_;
|
| -};
|
| -
|
| -} // namespace
|
| -
|
| @interface BrowserWindowController (JustForTesting)
|
| // Already defined in BWC.
|
| - (void)saveWindowPositionIfNeeded;
|
| @@ -719,20 +702,18 @@ TEST_F(BrowserWindowControllerTest, TestSigninMenuItemAuthError) {
|
| ProfileSyncServiceFactory::GetForProfile(profile());
|
| sync->SetSyncSetupCompleted();
|
| // Force an auth error.
|
| - FakeAuthStatusProvider provider;
|
| + FakeAuthStatusProvider provider(signin->signin_global_error());
|
| GoogleServiceAuthError error(
|
| GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS);
|
| - provider.set_auth_error(error);
|
| - signin->signin_global_error()->AddProvider(&provider);
|
| + provider.SetAuthError(error);
|
| [BrowserWindowController updateSigninItem:syncMenuItem
|
| shouldShow:YES
|
| currentProfile:profile()];
|
| NSString* authError =
|
| - l10n_util::GetNSStringWithFixup(IDS_SYNC_MENU_SYNC_ERROR_LABEL);
|
| + l10n_util::GetNSStringWithFixup(IDS_SYNC_SIGN_IN_ERROR_WRENCH_MENU_ITEM);
|
| EXPECT_TRUE([[syncMenuItem title] isEqualTo:authError]);
|
| EXPECT_FALSE([syncMenuItem isHidden]);
|
|
|
| - signin->signin_global_error()->RemoveProvider(&provider);
|
| }
|
|
|
| // If there's a separator after the signin menu item, make sure it is hidden/
|
|
|