OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 AccountReconcilorFactory::GetForProfile(profile()); | 217 AccountReconcilorFactory::GetForProfile(profile()); |
218 ASSERT_TRUE(reconcilor); | 218 ASSERT_TRUE(reconcilor); |
219 ASSERT_FALSE(reconcilor->IsRegisteredWithTokenService()); | 219 ASSERT_FALSE(reconcilor->IsRegisteredWithTokenService()); |
220 | 220 |
221 signin_manager()->set_password("password"); | 221 signin_manager()->set_password("password"); |
222 signin_manager()->OnExternalSigninCompleted(kTestEmail); | 222 signin_manager()->OnExternalSigninCompleted(kTestEmail); |
223 ASSERT_TRUE(reconcilor->IsRegisteredWithTokenService()); | 223 ASSERT_TRUE(reconcilor->IsRegisteredWithTokenService()); |
224 | 224 |
225 EXPECT_CALL(*GetMockReconcilor(), PerformLogoutAllAccountsAction()); | 225 EXPECT_CALL(*GetMockReconcilor(), PerformLogoutAllAccountsAction()); |
226 | 226 |
227 signin_manager()->SignOut(); | 227 signin_manager()->SignOut(signin_metrics::SIGNOUT_TEST); |
228 ASSERT_FALSE(reconcilor->IsRegisteredWithTokenService()); | 228 ASSERT_FALSE(reconcilor->IsRegisteredWithTokenService()); |
229 } | 229 } |
230 | 230 |
231 // This method requires the use of the |TestSigninClient| to be created from the | 231 // This method requires the use of the |TestSigninClient| to be created from the |
232 // |ChromeSigninClientFactory| because it overrides the |GoogleSigninSucceeded| | 232 // |ChromeSigninClientFactory| because it overrides the |GoogleSigninSucceeded| |
233 // method with an empty implementation. On MacOS, the normal implementation | 233 // method with an empty implementation. On MacOS, the normal implementation |
234 // causes the try_bots to time out. | 234 // causes the try_bots to time out. |
235 TEST_F(AccountReconcilorTest, Reauth) { | 235 TEST_F(AccountReconcilorTest, Reauth) { |
236 signin_manager()->SetAuthenticatedUsername(kTestEmail); | 236 signin_manager()->SetAuthenticatedUsername(kTestEmail); |
237 signin_manager()->set_password("password"); | 237 signin_manager()->set_password("password"); |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 | 757 |
758 base::RunLoop().RunUntilIdle(); | 758 base::RunLoop().RunUntilIdle(); |
759 SimulateMergeSessionCompleted(reconcilor, "user@gmail.com", | 759 SimulateMergeSessionCompleted(reconcilor, "user@gmail.com", |
760 GoogleServiceAuthError::AuthErrorNone()); | 760 GoogleServiceAuthError::AuthErrorNone()); |
761 ASSERT_FALSE(reconcilor->is_reconcile_started_); | 761 ASSERT_FALSE(reconcilor->is_reconcile_started_); |
762 } | 762 } |
763 | 763 |
764 INSTANTIATE_TEST_CASE_P(AccountReconcilorMaybeEnabled, | 764 INSTANTIATE_TEST_CASE_P(AccountReconcilorMaybeEnabled, |
765 AccountReconcilorTest, | 765 AccountReconcilorTest, |
766 testing::Bool()); | 766 testing::Bool()); |
OLD | NEW |