1 // Copyright (c) 2010 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 CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_ 6 #define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_ 7 #pragma once 8 9 #include <string> 10 11 #include "chrome/browser/sync/syncable/syncable.h" 12 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gtest/include/gtest/gtest.h" 14 15 using syncable::Directory; 16 using syncable::EntryKernel; 17 18 class MockDirectory : public Directory { 19 public: 20 MockDirectory(); 21 virtual ~MockDirectory(); 22 23 MOCK_METHOD1(GetEntryByHandle, syncable::EntryKernel*(int64)); 24 25 MOCK_METHOD2(set_last_downloadstamp, void(syncable::ModelType, int64)); 26 27 MOCK_METHOD1(GetEntryByClientTag, 28 syncable::EntryKernel*(const std::string&)); 29 }; 30 31 class MockSyncableWriteTransaction : public syncable::WriteTransaction { 32 public: 33 explicit MockSyncableWriteTransaction(Directory *directory); 34 }; 35 36 37 #endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_ 38 39