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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/sessions/test_util.h
diff --git a/chrome/browser/sync/sessions/test_util.h b/chrome/browser/sync/sessions/test_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..94fc37805b199cf4238f791dfe319d951aadc9c5
--- /dev/null
+++ b/chrome/browser/sync/sessions/test_util.h
@@ -0,0 +1,48 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Utils to simulate various outcomes of a sync session.
+#ifndef CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_
+#define CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_
+#pragma once
+
+#include "chrome/browser/sync/sessions/sync_session.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace browser_sync {
+namespace sessions {
+namespace test_util {
+
+void SimulateHasMoreToSync(sessions::SyncSession* session) {
+ session->status_controller()->update_conflicts_resolved(true);
+ ASSERT_TRUE(session->HasMoreToSync());
+}
+
+void SimulateDownloadUpdatesFailed(sessions::SyncSession* session) {
+
+}
+
+void SimulateCommitFailed(sessions::SyncSession* session) {
+
+}
+
+void SimulateSuccess(sessions::SyncSession* session) {
+ ASSERT_FALSE(session->HasMoreToSync());
+ ASSERT_EQ(0, session->status_controller()->num_server_changes_remaining());
+ ASSERT_EQ(0, session->status_controller()->unsynced_handles().size());
+}
+
+void SimulateThrottled(sessions::SyncSession* session) {
+
+}
+
+void SimulatePollIntervalUpdate(sessions::SyncSession* session) {
+
+}
+
+} // namespace test_util
+} // namespace sessions
+} // namespace browser_sync
+
+#endif // CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698