| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Utils to simulate various outcomes of a sync session. | 5 // Utils to simulate various outcomes of a sync session. |
| 6 #ifndef SYNC_SESSIONS_TEST_UTIL_H_ | 6 #ifndef SYNC_SESSIONS_TEST_UTIL_H_ |
| 7 #define SYNC_SESSIONS_TEST_UTIL_H_ | 7 #define SYNC_SESSIONS_TEST_UTIL_H_ |
| 8 | 8 |
| 9 #include "sync/engine/syncer.h" | 9 #include "sync/engine/syncer.h" |
| 10 #include "sync/sessions/sync_session.h" | 10 #include "sync/sessions/sync_session.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 void SimulateDownloadUpdatesFailed(ModelTypeSet requested_types, | 40 void SimulateDownloadUpdatesFailed(ModelTypeSet requested_types, |
| 41 const sessions::NudgeTracker& nudge_tracker, | 41 const sessions::NudgeTracker& nudge_tracker, |
| 42 sessions::SyncSession* session); | 42 sessions::SyncSession* session); |
| 43 void SimulateCommitFailed(ModelTypeSet requested_types, | 43 void SimulateCommitFailed(ModelTypeSet requested_types, |
| 44 const sessions::NudgeTracker& nudge_tracker, | 44 const sessions::NudgeTracker& nudge_tracker, |
| 45 sessions::SyncSession* session); | 45 sessions::SyncSession* session); |
| 46 void SimulateConnectionFailure(ModelTypeSet requested_types, | 46 void SimulateConnectionFailure(ModelTypeSet requested_types, |
| 47 const sessions::NudgeTracker& nudge_tracker, | 47 const sessions::NudgeTracker& nudge_tracker, |
| 48 sessions::SyncSession* session); | 48 sessions::SyncSession* session); |
| 49 | 49 |
| 50 // Poll/Retry successes and failures. | 50 // Poll successes and failures. |
| 51 void SimulatePollRetrySuccess(ModelTypeSet requested_types, | 51 void SimulatePollSuccess(ModelTypeSet requested_types, |
| 52 sessions::SyncSession* session); | 52 sessions::SyncSession* session); |
| 53 void SimulatePollRetryFailed(ModelTypeSet requested_types, | 53 void SimulatePollFailed(ModelTypeSet requested_types, |
| 54 sessions::SyncSession* session); | 54 sessions::SyncSession* session); |
| 55 | 55 |
| 56 void SimulateGuRetryDelayCommandImpl(sessions::SyncSession* session, | 56 void SimulateGuRetryDelayCommandImpl(sessions::SyncSession* session, |
| 57 base::TimeDelta delay); | 57 base::TimeDelta delay); |
| 58 | 58 |
| 59 void SimulateThrottledImpl(sessions::SyncSession* session, | 59 void SimulateThrottledImpl(sessions::SyncSession* session, |
| 60 const base::TimeDelta& delta); | 60 const base::TimeDelta& delta); |
| 61 | 61 |
| 62 void SimulateTypesThrottledImpl( | 62 void SimulateTypesThrottledImpl( |
| 63 sessions::SyncSession* session, | 63 sessions::SyncSession* session, |
| 64 ModelTypeSet types, | 64 ModelTypeSet types, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 95 | 95 |
| 96 ACTION_P(SimulateGuRetryDelayCommand, delay) { | 96 ACTION_P(SimulateGuRetryDelayCommand, delay) { |
| 97 SimulateGuRetryDelayCommandImpl(arg0, delay); | 97 SimulateGuRetryDelayCommandImpl(arg0, delay); |
| 98 } | 98 } |
| 99 | 99 |
| 100 } // namespace test_util | 100 } // namespace test_util |
| 101 } // namespace sessions | 101 } // namespace sessions |
| 102 } // namespace syncer | 102 } // namespace syncer |
| 103 | 103 |
| 104 #endif // SYNC_SESSIONS_TEST_UTIL_H_ | 104 #endif // SYNC_SESSIONS_TEST_UTIL_H_ |
| OLD | NEW |