OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 BLIMP_NET_TEST_COMMON_H_ | 5 #ifndef BLIMP_NET_TEST_COMMON_H_ |
6 #define BLIMP_NET_TEST_COMMON_H_ | 6 #define BLIMP_NET_TEST_COMMON_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 ~MockBlimpMessageProcessor() override; | 216 ~MockBlimpMessageProcessor() override; |
217 | 217 |
218 // Adapts calls from ProcessMessage to MockableProcessMessage by | 218 // Adapts calls from ProcessMessage to MockableProcessMessage by |
219 // unboxing the |message| std::unique_ptr for GMock compatibility. | 219 // unboxing the |message| std::unique_ptr for GMock compatibility. |
220 void ProcessMessage(std::unique_ptr<BlimpMessage> message, | 220 void ProcessMessage(std::unique_ptr<BlimpMessage> message, |
221 const net::CompletionCallback& callback) override; | 221 const net::CompletionCallback& callback) override; |
222 | 222 |
223 MOCK_METHOD2(MockableProcessMessage, | 223 MOCK_METHOD2(MockableProcessMessage, |
224 void(const BlimpMessage& message, | 224 void(const BlimpMessage& message, |
225 const net::CompletionCallback& callback)); | 225 const net::CompletionCallback& callback)); |
| 226 |
| 227 void SetTestCompletionCallback(const net::CompletionCallback& callback); |
| 228 BlimpMessage received_msg; |
| 229 |
| 230 private: |
| 231 net::CompletionCallback test_callback_; |
226 }; | 232 }; |
227 | 233 |
228 } // namespace blimp | 234 } // namespace blimp |
229 | 235 |
230 #endif // BLIMP_NET_TEST_COMMON_H_ | 236 #endif // BLIMP_NET_TEST_COMMON_H_ |
OLD | NEW |