| 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
|
|
|