Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Side by Side Diff: sync/sessions/test_util.h

Issue 19982002: sync: Remove SyncSourceInfo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Convert SyncShareRecords to typedef Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/sessions/sync_session_unittest.cc ('k') | sync/sessions/test_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace syncer { 14 namespace syncer {
15 namespace sessions { 15 namespace sessions {
16 namespace test_util { 16 namespace test_util {
17 17
18 // Configure sync cycle successes and failures. 18 // Configure sync cycle successes and failures.
19 void SimulateGetEncryptionKeyFailed(ModelTypeSet requested_types, 19 void SimulateGetEncryptionKeyFailed(
20 sessions::SyncSession* session); 20 ModelTypeSet requested_types,
21 void SimulateConfigureSuccess(ModelTypeSet requested_types, 21 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source,
22 sessions::SyncSession* session); 22 sessions::SyncSession* session);
23 void SimulateConfigureFailed(ModelTypeSet requested_types, 23 void SimulateConfigureSuccess(
24 sessions::SyncSession* session); 24 ModelTypeSet requested_types,
25 void SimulateConfigureConnectionFailure(ModelTypeSet requested_types, 25 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source,
26 sessions::SyncSession* session); 26 sessions::SyncSession* session);
27 void SimulateConfigureFailed(
28 ModelTypeSet requested_types,
29 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source,
30 sessions::SyncSession* session);
31 void SimulateConfigureConnectionFailure(
32 ModelTypeSet requested_types,
33 sync_pb::GetUpdatesCallerInfo::GetUpdatesSource source,
34 sessions::SyncSession* session);
27 35
28 // Normal mode sync cycle successes and failures. 36 // Normal mode sync cycle successes and failures.
29 void SimulateNormalSuccess(ModelTypeSet requested_types, 37 void SimulateNormalSuccess(ModelTypeSet requested_types,
30 const sessions::NudgeTracker& nudge_tracker, 38 const sessions::NudgeTracker& nudge_tracker,
31 sessions::SyncSession* session); 39 sessions::SyncSession* session);
32 void SimulateDownloadUpdatesFailed(ModelTypeSet requested_types, 40 void SimulateDownloadUpdatesFailed(ModelTypeSet requested_types,
33 const sessions::NudgeTracker& nudge_tracker, 41 const sessions::NudgeTracker& nudge_tracker,
34 sessions::SyncSession* session); 42 sessions::SyncSession* session);
35 void SimulateCommitFailed(ModelTypeSet requested_types, 43 void SimulateCommitFailed(ModelTypeSet requested_types,
36 const sessions::NudgeTracker& nudge_tracker, 44 const sessions::NudgeTracker& nudge_tracker,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 88
81 ACTION_P(SimulateSessionsCommitDelayUpdate, poll) { 89 ACTION_P(SimulateSessionsCommitDelayUpdate, poll) {
82 SimulateSessionsCommitDelayUpdateImpl(arg0, arg1, arg2, poll); 90 SimulateSessionsCommitDelayUpdateImpl(arg0, arg1, arg2, poll);
83 } 91 }
84 92
85 } // namespace test_util 93 } // namespace test_util
86 } // namespace sessions 94 } // namespace sessions
87 } // namespace syncer 95 } // namespace syncer
88 96
89 #endif // SYNC_SESSIONS_TEST_UTIL_H_ 97 #endif // SYNC_SESSIONS_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « sync/sessions/sync_session_unittest.cc ('k') | sync/sessions/test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698