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

Side by Side Diff: chrome/browser/app_controller_mac_unittest.mm

Issue 1094103005: Profile chooser on mac was passing wrong value to signin error controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/signin/signin_error_notifier_ash_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 std::string username = "foo@example.com"; 145 std::string username = "foo@example.com";
146 SigninManager* signin = SigninManagerFactory::GetForProfile(profile_); 146 SigninManager* signin = SigninManagerFactory::GetForProfile(profile_);
147 signin->SetAuthenticatedAccountInfo(username, username); 147 signin->SetAuthenticatedAccountInfo(username, username);
148 ProfileSyncService* sync = ProfileSyncServiceFactory::GetForProfile(profile_); 148 ProfileSyncService* sync = ProfileSyncServiceFactory::GetForProfile(profile_);
149 sync->SetSyncSetupCompleted(); 149 sync->SetSyncSetupCompleted();
150 // Force an auth error. 150 // Force an auth error.
151 FakeAuthStatusProvider provider( 151 FakeAuthStatusProvider provider(
152 SigninErrorControllerFactory::GetForProfile(profile_)); 152 SigninErrorControllerFactory::GetForProfile(profile_));
153 GoogleServiceAuthError error( 153 GoogleServiceAuthError error(
154 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS); 154 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS);
155 provider.SetAuthError("user@gmail.com", "user@gmail.com", error); 155 provider.SetAuthError("user@gmail.com", error);
156 [AppController updateSigninItem:syncMenuItem 156 [AppController updateSigninItem:syncMenuItem
157 shouldShow:YES 157 shouldShow:YES
158 currentProfile:profile_]; 158 currentProfile:profile_];
159 NSString* authError = 159 NSString* authError =
160 l10n_util::GetNSStringWithFixup(IDS_SYNC_SIGN_IN_ERROR_WRENCH_MENU_ITEM); 160 l10n_util::GetNSStringWithFixup(IDS_SYNC_SIGN_IN_ERROR_WRENCH_MENU_ITEM);
161 EXPECT_TRUE([[syncMenuItem title] isEqualTo:authError]); 161 EXPECT_TRUE([[syncMenuItem title] isEqualTo:authError]);
162 EXPECT_FALSE([syncMenuItem isHidden]); 162 EXPECT_FALSE([syncMenuItem isHidden]);
163 } 163 }
164 164
165 // If there's a separator after the signin menu item, make sure it is hidden/ 165 // If there's a separator after the signin menu item, make sure it is hidden/
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 217
218 [followingNonSeparator setHidden:YES]; 218 [followingNonSeparator setHidden:YES];
219 [AppController updateSigninItem:signinMenuItem 219 [AppController updateSigninItem:signinMenuItem
220 shouldShow:YES 220 shouldShow:YES
221 currentProfile:profile_]; 221 currentProfile:profile_];
222 222
223 EXPECT_TRUE([followingNonSeparator isEnabled]); 223 EXPECT_TRUE([followingNonSeparator isEnabled]);
224 EXPECT_FALSE([signinMenuItem isHidden]); 224 EXPECT_FALSE([signinMenuItem isHidden]);
225 EXPECT_TRUE([followingNonSeparator isHidden]); 225 EXPECT_TRUE([followingNonSeparator isHidden]);
226 } 226 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/signin/signin_error_notifier_ash_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698