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

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: linux compile Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/sessions/sync_session_unittest.cc ('k') | chrome/browser/sync/sessions/test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..420cf3f965765cbd1fd26a7203112ab655cedc9d
--- /dev/null
+++ b/chrome/browser/sync/sessions/test_util.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2011 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"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace browser_sync {
+namespace sessions {
+namespace test_util {
+
+void SimulateHasMoreToSync(sessions::SyncSession* session);
+void SimulateDownloadUpdatesFailed(sessions::SyncSession* session);
+void SimulateCommitFailed(sessions::SyncSession* session);
+void SimulateSuccess(sessions::SyncSession* session);
+void SimulateThrottledImpl(sessions::SyncSession* session,
+ const base::TimeDelta& delta);
+void SimulatePollIntervalUpdateImpl(sessions::SyncSession* session,
+ const base::TimeDelta& new_poll);
+
+ACTION_P(SimulateThrottled, throttle) {
+ SimulateThrottledImpl(arg0, throttle);
+}
+
+ACTION_P(SimulatePollIntervalUpdate, poll) {
+ SimulatePollIntervalUpdateImpl(arg0, poll);
+}
+
+} // namespace test_util
+} // namespace sessions
+} // namespace browser_sync
+
+#endif // CHROME_BROWSER_SYNC_SESSIONS_TEST_UTIL_H_
« no previous file with comments | « chrome/browser/sync/sessions/sync_session_unittest.cc ('k') | chrome/browser/sync/sessions/test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698