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

Unified Diff: blimp/net/tcp_transport_unittest.cc

Issue 1696563002: Blimp: add support for SSL connections. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reland (safe_json issue fixed). Created 4 years, 10 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
« no previous file with comments | « blimp/net/tcp_engine_transport.cc ('k') | blimp/net/test_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/net/tcp_transport_unittest.cc
diff --git a/blimp/net/tcp_transport_unittest.cc b/blimp/net/tcp_transport_unittest.cc
index cef15d37d804899a08e385434cc02632aab7a7e7..8f1525af29514719f9bd87b875fa190ffaa11b26 100644
--- a/blimp/net/tcp_transport_unittest.cc
+++ b/blimp/net/tcp_transport_unittest.cc
@@ -35,10 +35,10 @@ class TCPTransportTest : public testing::Test {
engine_.reset(new TCPEngineTransport(local_address, nullptr));
}
- net::AddressList GetLocalAddressList() const {
+ net::IPEndPoint GetLocalEndpoint() const {
net::IPEndPoint local_address;
- engine_->GetLocalAddressForTesting(&local_address);
- return net::AddressList(local_address);
+ CHECK_EQ(net::OK, engine_->GetLocalAddressForTesting(&local_address));
+ return local_address;
}
base::MessageLoopForIO message_loop_;
@@ -50,7 +50,7 @@ TEST_F(TCPTransportTest, Connect) {
engine_->Connect(accept_callback.callback());
net::TestCompletionCallback connect_callback;
- TCPClientTransport client(GetLocalAddressList(), nullptr);
+ TCPClientTransport client(GetLocalEndpoint(), nullptr);
client.Connect(connect_callback.callback());
EXPECT_EQ(net::OK, connect_callback.WaitForResult());
@@ -63,11 +63,11 @@ TEST_F(TCPTransportTest, TwoClientConnections) {
engine_->Connect(accept_callback1.callback());
net::TestCompletionCallback connect_callback1;
- TCPClientTransport client1(GetLocalAddressList(), nullptr);
+ TCPClientTransport client1(GetLocalEndpoint(), nullptr);
client1.Connect(connect_callback1.callback());
net::TestCompletionCallback connect_callback2;
- TCPClientTransport client2(GetLocalAddressList(), nullptr);
+ TCPClientTransport client2(GetLocalEndpoint(), nullptr);
client2.Connect(connect_callback2.callback());
EXPECT_EQ(net::OK, connect_callback1.WaitForResult());
@@ -86,7 +86,7 @@ TEST_F(TCPTransportTest, ExchangeMessages) {
net::TestCompletionCallback accept_callback;
engine_->Connect(accept_callback.callback());
net::TestCompletionCallback client_connect_callback;
- TCPClientTransport client(GetLocalAddressList(), nullptr /* NetLog */);
+ TCPClientTransport client(GetLocalEndpoint(), nullptr /* NetLog */);
client.Connect(client_connect_callback.callback());
EXPECT_EQ(net::OK, client_connect_callback.WaitForResult());
EXPECT_EQ(net::OK, accept_callback.WaitForResult());
« no previous file with comments | « blimp/net/tcp_engine_transport.cc ('k') | blimp/net/test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698