Index: blimp/net/test_common.h |
diff --git a/blimp/net/test_common.h b/blimp/net/test_common.h |
index e1e3d935c30f1cb7b407f22a6e9f493a7c1b5345..757caef94858e2191f90ab570d8c797c04932416 100644 |
--- a/blimp/net/test_common.h |
+++ b/blimp/net/test_common.h |
@@ -135,6 +135,8 @@ class MockStreamSocket : public net::StreamSocket { |
MOCK_CONST_METHOD0(GetTotalReceivedBytes, int64_t()); |
}; |
+class MockBlimpConnection; |
+ |
class MockTransport : public BlimpTransport { |
public: |
MockTransport(); |
@@ -142,9 +144,14 @@ class MockTransport : public BlimpTransport { |
MOCK_METHOD1(Connect, void(const net::CompletionCallback& callback)); |
MOCK_METHOD0(TakeMessagePortPtr, MessagePort*()); |
+ std::unique_ptr<BlimpConnection> MakeConnection() override; |
- std::unique_ptr<MessagePort> TakeMessagePort() override; |
const char* GetName() const override; |
+ |
+ void SetMockConnection(std::unique_ptr<MockBlimpConnection> connection); |
+ |
+ private: |
+ std::unique_ptr<MockBlimpConnection> connection_; |
}; |
class MockConnectionHandler : public ConnectionHandler { |