Chromium Code Reviews| Index: remoting/protocol/protocol_mock_objects.h |
| diff --git a/remoting/protocol/protocol_mock_objects.h b/remoting/protocol/protocol_mock_objects.h |
| index bb5a45725c8164432049adf3d8517ed2b0b1c557..8aad5123af23beb47c5762dec6ec4ab919116dd4 100644 |
| --- a/remoting/protocol/protocol_mock_objects.h |
| +++ b/remoting/protocol/protocol_mock_objects.h |
| @@ -6,6 +6,7 @@ |
| #define REMOTING_PROTOCOL_PROTOCOL_MOCK_OBJECTS_H_ |
| #include <cstdint> |
| +#include <deque> |
| #include <map> |
| #include <memory> |
| #include <string> |
| @@ -25,6 +26,7 @@ |
| #include "remoting/protocol/connection_to_client.h" |
| #include "remoting/protocol/host_stub.h" |
| #include "remoting/protocol/input_stub.h" |
| +#include "remoting/protocol/jingle_messages.h" |
| #include "remoting/protocol/pairing_registry.h" |
| #include "remoting/protocol/session.h" |
| #include "remoting/protocol/session_manager.h" |
| @@ -203,9 +205,17 @@ class MockSession : public Session { |
| MOCK_METHOD0(jid, const std::string&()); |
| MOCK_METHOD0(config, const SessionConfig&()); |
| MOCK_METHOD1(Close, void(ErrorCode error)); |
| - MOCK_METHOD1(AddPlugin, void(SessionPlugin* plugin)); |
| + |
| + // Sends |attachments_| to the |plugin|->OnIncomingMessage(). |
| + void AddPlugin(SessionPlugin* plugin) override; |
| + |
| + // Adds an |attachment| to |round|, which will be sent to plugins added by |
| + // AddPlugin() function. |
| + void SetAttachment(size_t round, |
|
Sergey Ulanov
2017/01/07 01:23:09
It's better to avoid mixing non-GMock code into Mo
Hzj_jie
2017/01/08 23:48:49
Done.
|
| + std::unique_ptr<buzz::XmlElement> attachment); |
| private: |
| + std::deque<JingleMessage> attachments_; |
| DISALLOW_COPY_AND_ASSIGN(MockSession); |
| }; |