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

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

Issue 5939006: sync: beginnings of MessageLoop based SyncerThread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 10 years 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
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // Utils to simulate various outcomes of a sync session.
6 #ifndef CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_
7 #define CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_
8 #pragma once
9
10 #include "chrome/browser/sync/sessions/sync_session.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12
13 namespace browser_sync {
14 namespace sessions {
15 namespace test_util {
16
17 void SimulateHasMoreToSync(sessions::SyncSession* session) {
18 session->status_controller()->update_conflicts_resolved(true);
19 ASSERT_TRUE(session->HasMoreToSync());
20 }
21
22 void SimulateDownloadUpdatesFailed(sessions::SyncSession* session) {
23
24 }
25
26 void SimulateCommitFailed(sessions::SyncSession* session) {
27
28 }
29
30 void SimulateSuccess(sessions::SyncSession* session) {
31 ASSERT_FALSE(session->HasMoreToSync());
32 ASSERT_EQ(0, session->status_controller()->num_server_changes_remaining());
33 ASSERT_EQ(0, session->status_controller()->unsynced_handles().size());
34 }
35
36 void SimulateThrottled(sessions::SyncSession* session) {
37
38 }
39
40 void SimulatePollIntervalUpdate(sessions::SyncSession* session) {
41
42 }
43
44 } // namespace test_util
45 } // namespace sessions
46 } // namespace browser_sync
47
48 #endif // CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698