1 // Copyright 2014 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.
5 #ifndef COMPONENTS_SYNC_DRIVER_CHANGE_PROCESSOR_MOCK_H_
6 #define COMPONENTS_SYNC_DRIVER_CHANGE_PROCESSOR_MOCK_H_
8 #include "components/sync_driver/change_processor.h"
9 #include "sync/internal_api/public/base/model_type.h"
10 #include "sync/internal_api/public/util/unrecoverable_error_handler.h"
11 #include "testing/gmock/include/gmock/gmock.h"
13 namespace browser_sync
{
15 class ChangeProcessorMock
16 : public ChangeProcessor
, public DataTypeErrorHandler
{
18 ChangeProcessorMock();
19 virtual ~ChangeProcessorMock();
20 MOCK_METHOD3(ApplyChangesFromSyncModel
,
21 void(const syncer::BaseTransaction
*, int64
,
22 const syncer::ImmutableChangeRecordList
&));
23 MOCK_METHOD0(CommitChangesFromSyncModel
, void());
24 MOCK_METHOD0(StartImpl
, void());
25 MOCK_CONST_METHOD0(IsRunning
, bool());
26 MOCK_METHOD2(OnUnrecoverableError
, void(const tracked_objects::Location
&,
28 MOCK_METHOD2(OnSingleDatatypeUnrecoverableError
,
29 void(const tracked_objects::Location
&,
31 MOCK_METHOD3(CreateAndUploadError
,
32 syncer::SyncError(const tracked_objects::Location
&,
38 } // namespace browser_sync
40 #endif // COMPONENTS_SYNC_DRIVER_CHANGE_PROCESSOR_MOCK_H_