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

Unified Diff: blimp/net/test_common.h

Issue 2439403003: Refactor BlimpConnection to TCPConnection (Closed)
Patch Set: Added missing Engine Transport Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
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 {

Powered by Google App Engine
This is Rietveld 408576698