1 // Copyright (c) 2012 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 SYNC_SYNCABLE_SYNCABLE_MOCK_H_
6 #define SYNC_SYNCABLE_SYNCABLE_MOCK_H_
10 #include "sync/syncable/directory.h"
11 #include "sync/syncable/write_transaction.h"
12 #include "sync/test/null_directory_change_delegate.h"
13 #include "testing/gmock/include/gmock/gmock.h"
14 #include "testing/gtest/include/gtest/gtest.h"
19 class MockDirectory
: public Directory
{
21 explicit MockDirectory(UnrecoverableErrorHandler
* handler
);
22 virtual ~MockDirectory();
24 MOCK_METHOD1(GetEntryByHandle
, syncable::EntryKernel
*(int64
));
26 MOCK_METHOD2(set_last_downloadstamp
, void(ModelType
, int64
));
28 MOCK_METHOD1(GetEntryByClientTag
,
29 syncable::EntryKernel
*(const std::string
&));
31 MOCK_METHOD1(PurgeEntriesWithTypeIn
, bool(ModelTypeSet
));
34 syncable::NullDirectoryChangeDelegate delegate_
;
37 class MockSyncableWriteTransaction
: public syncable::WriteTransaction
{
39 MockSyncableWriteTransaction(
40 const tracked_objects::Location
& from_here
, Directory
*directory
);
43 } // namespace syncable
46 #endif // SYNC_SYNCABLE_SYNCABLE_MOCK_H_