| 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 #pragma once | 8 #pragma once |
| 9 | 9 |
| 10 #include "sync/engine/syncer.h" | 10 #include "sync/engine/syncer.h" |
| 11 #include "sync/sessions/sync_session.h" | 11 #include "sync/sessions/sync_session.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 namespace csync { | 15 namespace syncer { |
| 16 namespace sessions { | 16 namespace sessions { |
| 17 namespace test_util { | 17 namespace test_util { |
| 18 | 18 |
| 19 void SimulateHasMoreToSync(sessions::SyncSession* session, | 19 void SimulateHasMoreToSync(sessions::SyncSession* session, |
| 20 SyncerStep begin, SyncerStep end); | 20 SyncerStep begin, SyncerStep end); |
| 21 void SimulateDownloadUpdatesFailed(sessions::SyncSession* session, | 21 void SimulateDownloadUpdatesFailed(sessions::SyncSession* session, |
| 22 SyncerStep begin, SyncerStep end); | 22 SyncerStep begin, SyncerStep end); |
| 23 void SimulateCommitFailed(sessions::SyncSession* session, | 23 void SimulateCommitFailed(sessions::SyncSession* session, |
| 24 SyncerStep begin, SyncerStep end); | 24 SyncerStep begin, SyncerStep end); |
| 25 void SimulateConnectionFailure(sessions::SyncSession* session, | 25 void SimulateConnectionFailure(sessions::SyncSession* session, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 40 ACTION_P(SimulatePollIntervalUpdate, poll) { | 40 ACTION_P(SimulatePollIntervalUpdate, poll) { |
| 41 SimulatePollIntervalUpdateImpl(arg0, poll); | 41 SimulatePollIntervalUpdateImpl(arg0, poll); |
| 42 } | 42 } |
| 43 | 43 |
| 44 ACTION_P(SimulateSessionsCommitDelayUpdate, poll) { | 44 ACTION_P(SimulateSessionsCommitDelayUpdate, poll) { |
| 45 SimulateSessionsCommitDelayUpdateImpl(arg0, poll); | 45 SimulateSessionsCommitDelayUpdateImpl(arg0, poll); |
| 46 } | 46 } |
| 47 | 47 |
| 48 } // namespace test_util | 48 } // namespace test_util |
| 49 } // namespace sessions | 49 } // namespace sessions |
| 50 } // namespace csync | 50 } // namespace syncer |
| 51 | 51 |
| 52 #endif // SYNC_SESSIONS_TEST_UTIL_H_ | 52 #endif // SYNC_SESSIONS_TEST_UTIL_H_ |
| OLD | NEW |