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

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

Issue 10455012: [Sync] Add support for performing a GetKey on startup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fred's comments Created 8 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
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 void SimulateHasMoreToSync(sessions::SyncSession* session, 18 void SimulateHasMoreToSync(sessions::SyncSession* session,
19 SyncerStep begin, SyncerStep end); 19 SyncerStep begin, SyncerStep end);
20 void SimulateGetEncryptionKeyFailed(sessions::SyncSession* session,
21 SyncerStep begin, SyncerStep end);
20 void SimulateDownloadUpdatesFailed(sessions::SyncSession* session, 22 void SimulateDownloadUpdatesFailed(sessions::SyncSession* session,
21 SyncerStep begin, SyncerStep end); 23 SyncerStep begin, SyncerStep end);
22 void SimulateCommitFailed(sessions::SyncSession* session, 24 void SimulateCommitFailed(sessions::SyncSession* session,
23 SyncerStep begin, SyncerStep end); 25 SyncerStep begin, SyncerStep end);
24 void SimulateConnectionFailure(sessions::SyncSession* session, 26 void SimulateConnectionFailure(sessions::SyncSession* session,
25 SyncerStep begin, SyncerStep end); 27 SyncerStep begin, SyncerStep end);
26 void SimulateSuccess(sessions::SyncSession* session, 28 void SimulateSuccess(sessions::SyncSession* session,
27 SyncerStep begin, SyncerStep end); 29 SyncerStep begin, SyncerStep end);
28 void SimulateThrottledImpl(sessions::SyncSession* session, 30 void SimulateThrottledImpl(sessions::SyncSession* session,
29 const base::TimeDelta& delta); 31 const base::TimeDelta& delta);
(...skipping 12 matching lines...) Expand all
42 44
43 ACTION_P(SimulateSessionsCommitDelayUpdate, poll) { 45 ACTION_P(SimulateSessionsCommitDelayUpdate, poll) {
44 SimulateSessionsCommitDelayUpdateImpl(arg0, poll); 46 SimulateSessionsCommitDelayUpdateImpl(arg0, poll);
45 } 47 }
46 48
47 } // namespace test_util 49 } // namespace test_util
48 } // namespace sessions 50 } // namespace sessions
49 } // namespace syncer 51 } // namespace syncer
50 52
51 #endif // SYNC_SESSIONS_TEST_UTIL_H_ 53 #endif // SYNC_SESSIONS_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698