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

Unified Diff: net/socket/tcp_client_socket_pool_unittest.cc

Issue 126303: Add a "LoadLog*" parameter to transactions, hostresolver, clientsocketpool. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync again Created 11 years, 4 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 | « net/socket/tcp_client_socket_pool.cc ('k') | net/socket/tcp_client_socket_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_client_socket_pool_unittest.cc
===================================================================
--- net/socket/tcp_client_socket_pool_unittest.cc (revision 23124)
+++ net/socket/tcp_client_socket_pool_unittest.cc (working copy)
@@ -209,7 +209,7 @@
TestCompletionCallback callback;
ClientSocketHandle handle(pool_.get());
HostResolver::RequestInfo info("www.google.com", 80);
- int rv = handle.Init("a", info, 0, &callback);
+ int rv = handle.Init(NULL, "a", info, 0, &callback);
EXPECT_EQ(ERR_IO_PENDING, rv);
EXPECT_FALSE(handle.is_initialized());
EXPECT_FALSE(handle.socket());
@@ -226,7 +226,7 @@
TestSocketRequest req(pool_.get(), &request_order_, &completion_count_);
HostResolver::RequestInfo info("unresolvable.host.name", 80);
EXPECT_EQ(ERR_IO_PENDING,
- req.handle()->Init("a", info, kDefaultPriority, &req));
+ req.handle()->Init(NULL, "a", info, kDefaultPriority, &req));
EXPECT_EQ(ERR_NAME_NOT_RESOLVED, req.WaitForResult());
}
@@ -236,13 +236,13 @@
TestSocketRequest req(pool_.get(), &request_order_, &completion_count_);
HostResolver::RequestInfo info("a", 80);
EXPECT_EQ(ERR_IO_PENDING,
- req.handle()->Init("a", info, kDefaultPriority, &req));
+ req.handle()->Init(NULL, "a", info, kDefaultPriority, &req));
EXPECT_EQ(ERR_CONNECTION_FAILED, req.WaitForResult());
// Make the host resolutions complete synchronously this time.
host_resolver_->set_synchronous_mode(true);
EXPECT_EQ(ERR_CONNECTION_FAILED,
- req.handle()->Init("a", info, kDefaultPriority, &req));
+ req.handle()->Init(NULL, "a", info, kDefaultPriority, &req));
}
TEST_F(TCPClientSocketPoolTest, PendingRequests) {
@@ -348,7 +348,7 @@
TestSocketRequest req(pool_.get(), &request_order_, &completion_count_);
HostResolver::RequestInfo info("www.google.com", 80);
EXPECT_EQ(ERR_IO_PENDING,
- req.handle()->Init("a", info, kDefaultPriority, &req));
+ req.handle()->Init(NULL, "a", info, kDefaultPriority, &req));
req.handle()->Reset();
PlatformThread::Sleep(100);
@@ -367,9 +367,9 @@
HostResolver::RequestInfo info("www.google.com", 80);
EXPECT_EQ(ERR_IO_PENDING,
- req.handle()->Init("a", info, kDefaultPriority, &req));
+ req.handle()->Init(NULL, "a", info, kDefaultPriority, &req));
EXPECT_EQ(ERR_IO_PENDING,
- req2.handle()->Init("a", info, kDefaultPriority, &req2));
+ req2.handle()->Init(NULL, "a", info, kDefaultPriority, &req2));
req.handle()->Reset();
@@ -385,12 +385,14 @@
TestSocketRequest req(pool_.get(), &request_order_, &completion_count_);
HostResolver::RequestInfo info("www.google.com", 80);
- EXPECT_EQ(ERR_IO_PENDING, handle.Init("a", info, kDefaultPriority, &callback));
+ EXPECT_EQ(ERR_IO_PENDING,
+ handle.Init(NULL, "a", info, kDefaultPriority, &callback));
handle.Reset();
TestCompletionCallback callback2;
- EXPECT_EQ(ERR_IO_PENDING, handle.Init("a", info, kDefaultPriority, &callback2));
+ EXPECT_EQ(ERR_IO_PENDING,
+ handle.Init(NULL, "a", info, kDefaultPriority, &callback2));
host_resolver_->set_synchronous_mode(true);
// At this point, handle has two ConnectingSockets out for it. Due to the
@@ -479,8 +481,8 @@
if (!within_callback_) {
handle_->Reset();
within_callback_ = true;
- int rv = handle_->Init(
- "a", HostResolver::RequestInfo("www.google.com", 80), 0, this);
+ int rv = handle_->Init(NULL, "a",
+ HostResolver::RequestInfo("www.google.com", 80), 0, this);
EXPECT_EQ(OK, rv);
}
}
@@ -498,8 +500,8 @@
TEST_F(TCPClientSocketPoolTest, RequestTwice) {
ClientSocketHandle handle(pool_.get());
RequestSocketCallback callback(&handle);
- int rv = handle.Init(
- "a", HostResolver::RequestInfo("www.google.com", 80), 0, &callback);
+ int rv = handle.Init(NULL, "a",
+ HostResolver::RequestInfo("www.google.com", 80), 0, &callback);
ASSERT_EQ(ERR_IO_PENDING, rv);
// The callback is going to request "www.google.com". We want it to complete
« no previous file with comments | « net/socket/tcp_client_socket_pool.cc ('k') | net/socket/tcp_client_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698