Index: blimp/net/tcp_transport_unittest.cc |
diff --git a/blimp/net/tcp_transport_unittest.cc b/blimp/net/tcp_transport_unittest.cc |
index f6980d951f5e8eb772db1a4ddb702ead1830a269..19979b3983533ae44c1c5a38dc45a21a8c8dce6a 100644 |
--- a/blimp/net/tcp_transport_unittest.cc |
+++ b/blimp/net/tcp_transport_unittest.cc |
@@ -10,6 +10,7 @@ |
#include "blimp/common/proto/blimp_message.pb.h" |
#include "blimp/common/proto/protocol_control.pb.h" |
#include "blimp/net/blimp_connection.h" |
+#include "blimp/net/blimp_connection_statistics.h" |
#include "blimp/net/tcp_client_transport.h" |
#include "blimp/net/tcp_engine_transport.h" |
#include "blimp/net/test_common.h" |
@@ -46,11 +47,12 @@ class TCPTransportTest : public testing::Test { |
}; |
TEST_F(TCPTransportTest, Connect) { |
+ BlimpConnectionStatistics statistics; |
net::TestCompletionCallback accept_callback; |
engine_->Connect(accept_callback.callback()); |
net::TestCompletionCallback connect_callback; |
- TCPClientTransport client(GetLocalEndpoint(), nullptr); |
+ TCPClientTransport client(GetLocalEndpoint(), &statistics, nullptr); |
client.Connect(connect_callback.callback()); |
EXPECT_EQ(net::OK, connect_callback.WaitForResult()); |
@@ -59,15 +61,16 @@ TEST_F(TCPTransportTest, Connect) { |
} |
TEST_F(TCPTransportTest, TwoClientConnections) { |
+ BlimpConnectionStatistics statistics; |
net::TestCompletionCallback accept_callback1; |
engine_->Connect(accept_callback1.callback()); |
net::TestCompletionCallback connect_callback1; |
- TCPClientTransport client1(GetLocalEndpoint(), nullptr); |
+ TCPClientTransport client1(GetLocalEndpoint(), &statistics, nullptr); |
client1.Connect(connect_callback1.callback()); |
net::TestCompletionCallback connect_callback2; |
- TCPClientTransport client2(GetLocalEndpoint(), nullptr); |
+ TCPClientTransport client2(GetLocalEndpoint(), &statistics, nullptr); |
client2.Connect(connect_callback2.callback()); |
EXPECT_EQ(net::OK, connect_callback1.WaitForResult()); |
@@ -82,11 +85,14 @@ TEST_F(TCPTransportTest, TwoClientConnections) { |
} |
TEST_F(TCPTransportTest, ExchangeMessages) { |
+ BlimpConnectionStatistics statistics; |
+ |
// Start the Engine transport and connect a client to it. |
net::TestCompletionCallback accept_callback; |
engine_->Connect(accept_callback.callback()); |
net::TestCompletionCallback client_connect_callback; |
- TCPClientTransport client(GetLocalEndpoint(), nullptr /* NetLog */); |
+ TCPClientTransport client(GetLocalEndpoint(), &statistics, |
+ nullptr /* NetLog */); |
client.Connect(client_connect_callback.callback()); |
EXPECT_EQ(net::OK, client_connect_callback.WaitForResult()); |
EXPECT_EQ(net::OK, accept_callback.WaitForResult()); |