Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: chrome/browser/sync/syncable/syncable_mock.h

Issue 6413036: Another big out-of-lining of test code. Hits a lot of gmock objects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lei comments Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_ 5 #ifndef CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_
6 #define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_ 6 #define CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "chrome/browser/sync/syncable/syncable.h" 11 #include "chrome/browser/sync/syncable/syncable.h"
12 #include "testing/gmock/include/gmock/gmock.h" 12 #include "testing/gmock/include/gmock/gmock.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 using syncable::Directory; 15 using syncable::Directory;
16 using syncable::EntryKernel; 16 using syncable::EntryKernel;
17 17
18 class MockDirectory : public Directory { 18 class MockDirectory : public Directory {
19 public: 19 public:
20 MockDirectory() { 20 MockDirectory();
21 init_kernel("myk"); 21 virtual ~MockDirectory();
22 } 22
23 MOCK_METHOD1(GetEntryByHandle, syncable::EntryKernel*(int64)); 23 MOCK_METHOD1(GetEntryByHandle, syncable::EntryKernel*(int64));
24 24
25 MOCK_METHOD2(set_last_downloadstamp, void(syncable::ModelType, int64)); 25 MOCK_METHOD2(set_last_downloadstamp, void(syncable::ModelType, int64));
26 26
27 MOCK_METHOD1(GetEntryByClientTag, 27 MOCK_METHOD1(GetEntryByClientTag,
28 syncable::EntryKernel*(const std::string&)); 28 syncable::EntryKernel*(const std::string&));
29 }; 29 };
30 30
31 class MockSyncableWriteTransaction : public syncable::WriteTransaction { 31 class MockSyncableWriteTransaction : public syncable::WriteTransaction {
32 public: 32 public:
33 explicit MockSyncableWriteTransaction(Directory *directory) : 33 explicit MockSyncableWriteTransaction(Directory *directory);
34 WriteTransaction(directory, syncable::UNITTEST, "dontcare.cpp", 25) {
35 }
36 }; 34 };
37 35
38 36
39 #endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_ 37 #endif // CHROME_BROWSER_SYNC_SYNCABLE_SYNCABLE_MOCK_H_
40 38
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_test_util.cc ('k') | chrome/browser/sync/syncable/syncable_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698