OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_ | 6 #ifndef CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_ |
7 #define CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_ | 7 #define CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_ |
8 #pragma once | 8 #pragma once |
9 | 9 |
10 #include "chrome/browser/sync/engine/syncer.h" | 10 #include "chrome/browser/sync/engine/syncer.h" |
(...skipping 10 matching lines...) Expand all Loading... |
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 SimulateSuccess(sessions::SyncSession* session, | 25 void SimulateSuccess(sessions::SyncSession* session, |
26 SyncerStep begin, SyncerStep end); | 26 SyncerStep begin, SyncerStep end); |
27 void SimulateThrottledImpl(sessions::SyncSession* session, | 27 void SimulateThrottledImpl(sessions::SyncSession* session, |
28 const base::TimeDelta& delta); | 28 const base::TimeDelta& delta); |
29 void SimulatePollIntervalUpdateImpl(sessions::SyncSession* session, | 29 void SimulatePollIntervalUpdateImpl(sessions::SyncSession* session, |
30 const base::TimeDelta& new_poll); | 30 const base::TimeDelta& new_poll); |
| 31 void SimulateSessionsCommitDelayUpdateImpl(sessions::SyncSession* session, |
| 32 const base::TimeDelta& new_delay); |
31 | 33 |
32 ACTION_P(SimulateThrottled, throttle) { | 34 ACTION_P(SimulateThrottled, throttle) { |
33 SimulateThrottledImpl(arg0, throttle); | 35 SimulateThrottledImpl(arg0, throttle); |
34 } | 36 } |
35 | 37 |
36 ACTION_P(SimulatePollIntervalUpdate, poll) { | 38 ACTION_P(SimulatePollIntervalUpdate, poll) { |
37 SimulatePollIntervalUpdateImpl(arg0, poll); | 39 SimulatePollIntervalUpdateImpl(arg0, poll); |
38 } | 40 } |
39 | 41 |
| 42 ACTION_P(SimulateSessionsCommitDelayUpdate, poll) { |
| 43 SimulateSessionsCommitDelayUpdateImpl(arg0, poll); |
| 44 } |
| 45 |
40 } // namespace test_util | 46 } // namespace test_util |
41 } // namespace sessions | 47 } // namespace sessions |
42 } // namespace browser_sync | 48 } // namespace browser_sync |
43 | 49 |
44 #endif // CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_ | 50 #endif // CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_ |
OLD | NEW |