| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 class MockAccountReconcilor : public testing::StrictMock<AccountReconcilor> { | 47 class MockAccountReconcilor : public testing::StrictMock<AccountReconcilor> { |
| 48 public: | 48 public: |
| 49 static KeyedService* Build(content::BrowserContext* context); | 49 static KeyedService* Build(content::BrowserContext* context); |
| 50 | 50 |
| 51 MockAccountReconcilor(ProfileOAuth2TokenService* token_service, | 51 MockAccountReconcilor(ProfileOAuth2TokenService* token_service, |
| 52 SigninManagerBase* signin_manager, | 52 SigninManagerBase* signin_manager, |
| 53 SigninClient* client); | 53 SigninClient* client); |
| 54 virtual ~MockAccountReconcilor() {} | 54 virtual ~MockAccountReconcilor() {} |
| 55 | 55 |
| 56 virtual void StartFetchingExternalCcResult() OVERRIDE { |
| 57 // Don't do this in tests. |
| 58 } |
| 59 |
| 56 MOCK_METHOD1(PerformMergeAction, void(const std::string& account_id)); | 60 MOCK_METHOD1(PerformMergeAction, void(const std::string& account_id)); |
| 57 MOCK_METHOD1(PerformStartRemoveAction, void(const std::string& account_id)); | 61 MOCK_METHOD1(PerformStartRemoveAction, void(const std::string& account_id)); |
| 58 MOCK_METHOD3( | 62 MOCK_METHOD3( |
| 59 PerformFinishRemoveAction, | 63 PerformFinishRemoveAction, |
| 60 void(const std::string& account_id, | 64 void(const std::string& account_id, |
| 61 const GoogleServiceAuthError& error, | 65 const GoogleServiceAuthError& error, |
| 62 const std::vector<std::pair<std::string, bool> >& accounts)); | 66 const std::vector<std::pair<std::string, bool> >& accounts)); |
| 63 MOCK_METHOD3(PerformAddToChromeAction, | 67 MOCK_METHOD3(PerformAddToChromeAction, |
| 64 void(const std::string& account_id, | 68 void(const std::string& account_id, |
| 65 int session_index, | 69 int session_index, |
| (...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 | 798 |
| 795 SimulateMergeSessionCompleted(reconcilor, "user@gmail.com", | 799 SimulateMergeSessionCompleted(reconcilor, "user@gmail.com", |
| 796 GoogleServiceAuthError::AuthErrorNone()); | 800 GoogleServiceAuthError::AuthErrorNone()); |
| 797 ASSERT_FALSE(reconcilor->is_reconcile_started_); | 801 ASSERT_FALSE(reconcilor->is_reconcile_started_); |
| 798 } | 802 } |
| 799 | 803 |
| 800 INSTANTIATE_TEST_CASE_P(AccountReconcilorMaybeEnabled, | 804 INSTANTIATE_TEST_CASE_P(AccountReconcilorMaybeEnabled, |
| 801 AccountReconcilorTest, | 805 AccountReconcilorTest, |
| 802 testing::Bool()); | 806 testing::Bool()); |
| 803 | 807 |
| OLD | NEW |