| 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 cycle. | |
| 6 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_CYCLE_TEST_UTIL_H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_CYCLE_TEST_UTIL_H_ |
| 7 #define COMPONENTS_SYNC_ENGINE_IMPL_CYCLE_TEST_UTIL_H_ | 6 #define COMPONENTS_SYNC_ENGINE_IMPL_CYCLE_TEST_UTIL_H_ |
| 8 | 7 |
| 9 #include "components/sync/engine_impl/cycle/sync_cycle.h" | 8 #include "components/sync/engine_impl/cycle/sync_cycle.h" |
| 10 #include "components/sync/engine_impl/syncer.h" | 9 #include "components/sync/engine_impl/syncer.h" |
| 11 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 12 |
| 14 namespace syncer { | 13 namespace syncer { |
| 15 namespace test_util { | 14 namespace test_util { |
| 16 | 15 |
| 16 // Utils to simulate various outcomes of a sync cycle. |
| 17 |
| 17 // Configure sync cycle successes and failures. | 18 // Configure sync cycle successes and failures. |
| 18 void SimulateGetEncryptionKeyFailed( | 19 void SimulateGetEncryptionKeyFailed( |
| 19 ModelTypeSet requested_types, | 20 ModelTypeSet requested_types, |
| 20 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source, | 21 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source, |
| 21 SyncCycle* cycle); | 22 SyncCycle* cycle); |
| 22 void SimulateConfigureSuccess( | 23 void SimulateConfigureSuccess( |
| 23 ModelTypeSet requested_types, | 24 ModelTypeSet requested_types, |
| 24 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source, | 25 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source, |
| 25 SyncCycle* cycle); | 26 SyncCycle* cycle); |
| 26 void SimulateConfigureFailed( | 27 void SimulateConfigureFailed( |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 } | 87 } |
| 87 | 88 |
| 88 ACTION_P(SimulateGuRetryDelayCommand, delay) { | 89 ACTION_P(SimulateGuRetryDelayCommand, delay) { |
| 89 SimulateGuRetryDelayCommandImpl(arg0, delay); | 90 SimulateGuRetryDelayCommandImpl(arg0, delay); |
| 90 } | 91 } |
| 91 | 92 |
| 92 } // namespace test_util | 93 } // namespace test_util |
| 93 } // namespace syncer | 94 } // namespace syncer |
| 94 | 95 |
| 95 #endif // COMPONENTS_SYNC_ENGINE_IMPL_CYCLE_TEST_UTIL_H_ | 96 #endif // COMPONENTS_SYNC_ENGINE_IMPL_CYCLE_TEST_UTIL_H_ |
| OLD | NEW |