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

Side by Side Diff: blimp/helium/mock_objects.h

Issue 2602103002: Delete blimp/helium and remove references to it from dependent targets (Closed)
Patch Set: . Created 3 years, 11 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
« no previous file with comments | « blimp/helium/lww_register_unittest.cc ('k') | blimp/helium/mock_objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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 BLIMP_HELIUM_MOCK_OBJECTS_H_
6 #define BLIMP_HELIUM_MOCK_OBJECTS_H_
7
8 #include "base/memory/ptr_util.h"
9 #include "blimp/helium/serializable_struct.h"
10 #include "blimp/helium/syncable.h"
11 #include "blimp/helium/update_scheduler.h"
12 #include "testing/gmock/include/gmock/gmock.h"
13
14 namespace blimp {
15 namespace helium {
16
17 struct TestSyncableChangeset : public SerializableStruct {
18 TestSyncableChangeset();
19 ~TestSyncableChangeset() override;
20
21 TestSyncableChangeset& operator=(const TestSyncableChangeset& other);
22
23 Field<int32_t> value;
24 };
25
26 class MockSyncable : public LazySyncable<TestSyncableChangeset> {
27 public:
28 MockSyncable();
29 ~MockSyncable() override;
30
31 MOCK_CONST_METHOD1(CreateChangesetMock, TestSyncableChangeset*(Revision));
32 MOCK_METHOD1(ApplyChangeset, void(const TestSyncableChangeset&));
33 MOCK_CONST_METHOD1(ValidateChangeset, bool(const TestSyncableChangeset&));
34 MOCK_METHOD1(ReleaseBefore, void(Revision));
35 MOCK_CONST_METHOD0(GetRevision, Revision());
36 MOCK_METHOD2(PrepareToCreateChangeset, void(Revision, base::Closure));
37 MOCK_METHOD1(SetLocalUpdateCallback, void(const base::Closure&));
38
39 std::unique_ptr<TestSyncableChangeset> CreateChangeset(Revision from) const;
40
41 private:
42 DISALLOW_COPY_AND_ASSIGN(MockSyncable);
43 };
44
45 class MockStreamPump : public StreamPump {
46 public:
47 MockStreamPump();
48 ~MockStreamPump() override;
49
50 MOCK_METHOD0(OnMessageAvailable, void());
51
52 private:
53 DISALLOW_COPY_AND_ASSIGN(MockStreamPump);
54 };
55
56 } // namespace helium
57 } // namespace blimp
58 #endif // BLIMP_HELIUM_MOCK_OBJECTS_H_
OLDNEW
« no previous file with comments | « blimp/helium/lww_register_unittest.cc ('k') | blimp/helium/mock_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698