Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / components / sync_driver / change_processor_mock.h
blob7acf83f0b9ba397e4b363f7913f076a070fea9cc
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 sync_driver {
15 class ChangeProcessorMock
16 : public ChangeProcessor, public DataTypeErrorHandler{
17 public:
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&,
27 const std::string&));
28 MOCK_METHOD1(OnSingleDataTypeUnrecoverableError,
29 void(const syncer::SyncError&));
30 MOCK_METHOD3(CreateAndUploadError,
31 syncer::SyncError(const tracked_objects::Location&,
32 const std::string&,
33 syncer::ModelType));
37 } // namespace sync_driver
39 #endif // COMPONENTS_SYNC_DRIVER_CHANGE_PROCESSOR_MOCK_H_