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. 4 5 #ifndef COMPONENTS_SYNC_DRIVER_CHANGE_PROCESSOR_MOCK_H_ 6 #define COMPONENTS_SYNC_DRIVER_CHANGE_PROCESSOR_MOCK_H_ 7 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" 12 13 namespace browser_sync { 14 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_METHOD2(OnSingleDatatypeUnrecoverableError, 29 void(const tracked_objects::Location&, 30 const std::string&)); 31 MOCK_METHOD3(CreateAndUploadError, 32 syncer::SyncError(const tracked_objects::Location&, 33 const std::string&, 34 syncer::ModelType)); 35 36 }; 37 38 } // namespace browser_sync 39 40 #endif // COMPONENTS_SYNC_DRIVER_CHANGE_PROCESSOR_MOCK_H_ 41