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

Unified Diff: chrome/browser/sync/glue/sync_backend_host_mock.cc

Issue 6056008: Move lots of GMock stuff out of line. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright junk Created 9 years, 12 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
Index: chrome/browser/sync/glue/sync_backend_host_mock.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host_mock.cc b/chrome/browser/sync/glue/sync_backend_host_mock.cc
new file mode 100644
index 0000000000000000000000000000000000000000..fe488adbfeba40be566e9310b0b25c26cf1cf315
--- /dev/null
+++ b/chrome/browser/sync/glue/sync_backend_host_mock.cc
@@ -0,0 +1,26 @@
+// 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.
+
+#include "chrome/browser/sync/glue/sync_backend_host_mock.h"
+
+namespace browser_sync {
+
+SyncBackendHostMock::SyncBackendHostMock() {
+ // By default, the RequestPause and RequestResume methods will
+ // send the confirmation notification and return true.
+ ON_CALL(*this, RequestPause()).
+ WillByDefault(testing::DoAll(Notify(NotificationType::SYNC_PAUSED),
+ testing::Return(true)));
+ ON_CALL(*this, RequestResume()).
+ WillByDefault(testing::DoAll(Notify(NotificationType::SYNC_RESUMED),
+ testing::Return(true)));
+
+ // By default, invoke the ready callback.
+ ON_CALL(*this, ConfigureDataTypes(testing::_, testing::_)).
+ WillByDefault(InvokeTask());
+}
+
+SyncBackendHostMock::~SyncBackendHostMock() {}
+
+} // namespace browser_sync

Powered by Google App Engine
This is Rietveld 408576698