OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 CHROMEOS_COMPONENTS_TETHER_MOCK_TETHER_HOST_RESPONSE_RECORDER_H_ | 5 #ifndef CHROMEOS_COMPONENTS_TETHER_MOCK_TETHER_HOST_RESPONSE_RECORDER_H_ |
6 #define CHROMEOS_COMPONENTS_TETHER_MOCK_TETHER_HOST_RESPONSE_RECORDER_H_ | 6 #define CHROMEOS_COMPONENTS_TETHER_MOCK_TETHER_HOST_RESPONSE_RECORDER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "chromeos/components/tether/tether_host_response_recorder.h" | 11 #include "chromeos/components/tether/tether_host_response_recorder.h" |
12 #include "components/cryptauth/remote_device.h" | 12 #include "components/cryptauth/remote_device.h" |
13 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
14 | 14 |
15 namespace chromeos { | 15 namespace chromeos { |
16 | 16 |
17 namespace tether { | 17 namespace tether { |
18 | 18 |
19 // Test double for TetherHostResponseRecorder. | 19 // Test double for TetherHostResponseRecorder. |
20 class MockTetherHostResponseRecorder : public TetherHostResponseRecorder { | 20 class MockTetherHostResponseRecorder : public TetherHostResponseRecorder { |
21 public: | 21 public: |
22 MockTetherHostResponseRecorder(); | 22 MockTetherHostResponseRecorder(); |
23 ~MockTetherHostResponseRecorder() override; | 23 ~MockTetherHostResponseRecorder() override; |
24 | 24 |
25 void NotifyPreviouslyConnectedHostIdsChanged(); | |
stevenjb
2017/05/01 18:26:11
It is unconventional for mocks to have methods. In
Kyle Horimoto
2017/05/01 21:14:43
Done.
| |
26 | |
25 MOCK_METHOD1(RecordSuccessfulTetherAvailabilityResponse, | 27 MOCK_METHOD1(RecordSuccessfulTetherAvailabilityResponse, |
26 void(const cryptauth::RemoteDevice&)); | 28 void(const cryptauth::RemoteDevice&)); |
27 MOCK_METHOD1(RecordSuccessfulConnectTetheringResponse, | 29 MOCK_METHOD1(RecordSuccessfulConnectTetheringResponse, |
28 void(const cryptauth::RemoteDevice&)); | 30 void(const cryptauth::RemoteDevice&)); |
29 MOCK_CONST_METHOD0(GetPreviouslyAvailableHostIds, std::vector<std::string>()); | 31 MOCK_CONST_METHOD0(GetPreviouslyAvailableHostIds, std::vector<std::string>()); |
30 MOCK_CONST_METHOD0(GetPreviouslyConnectedHostIds, std::vector<std::string>()); | 32 MOCK_CONST_METHOD0(GetPreviouslyConnectedHostIds, std::vector<std::string>()); |
31 | 33 |
32 private: | 34 private: |
33 DISALLOW_COPY_AND_ASSIGN(MockTetherHostResponseRecorder); | 35 DISALLOW_COPY_AND_ASSIGN(MockTetherHostResponseRecorder); |
34 }; | 36 }; |
35 | 37 |
36 } // namespace tether | 38 } // namespace tether |
37 | 39 |
38 } // namespace chromeos | 40 } // namespace chromeos |
39 | 41 |
40 #endif // CHROMEOS_COMPONENTS_TETHER_MOCK_TETHER_HOST_RESPONSE_RECORDER_H_ | 42 #endif // CHROMEOS_COMPONENTS_TETHER_MOCK_TETHER_HOST_RESPONSE_RECORDER_H_ |
OLD | NEW |