Chromium Code Reviews

Side by Side Diff: net/socket/client_socket_pool_base_unittest.cc

Issue 2363003: Rework the logging for sockets/connectjobs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « net/socket/client_socket_pool_base.cc ('k') | net/socket/socks_client_socket_pool.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/socket/client_socket_pool_base.h" 5 #include "net/socket/client_socket_pool_base.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/platform_thread.h" 10 #include "base/platform_thread.h"
(...skipping 28 matching lines...)
39 // Socket methods: 39 // Socket methods:
40 virtual int Read( 40 virtual int Read(
41 IOBuffer* /* buf */, int /* len */, CompletionCallback* /* callback */) { 41 IOBuffer* /* buf */, int /* len */, CompletionCallback* /* callback */) {
42 return ERR_UNEXPECTED; 42 return ERR_UNEXPECTED;
43 } 43 }
44 44
45 virtual int Write( 45 virtual int Write(
46 IOBuffer* /* buf */, int /* len */, CompletionCallback* /* callback */) { 46 IOBuffer* /* buf */, int /* len */, CompletionCallback* /* callback */) {
47 return ERR_UNEXPECTED; 47 return ERR_UNEXPECTED;
48 } 48 }
49 virtual bool SetReceiveBufferSize(int32 size) { return true; }; 49 virtual bool SetReceiveBufferSize(int32 size) { return true; }
50 virtual bool SetSendBufferSize(int32 size) { return true; }; 50 virtual bool SetSendBufferSize(int32 size) { return true; }
51 51
52 // ClientSocket methods: 52 // ClientSocket methods:
53 53
54 virtual int Connect(CompletionCallback* callback) { 54 virtual int Connect(CompletionCallback* callback) {
55 connected_ = true; 55 connected_ = true;
56 return OK; 56 return OK;
57 } 57 }
58 58
59 virtual void Disconnect() { connected_ = false; } 59 virtual void Disconnect() { connected_ = false; }
60 virtual bool IsConnected() const { return connected_; } 60 virtual bool IsConnected() const { return connected_; }
(...skipping 54 matching lines...)
115 kMockWaitingJob, 115 kMockWaitingJob,
116 kMockAdvancingLoadStateJob, 116 kMockAdvancingLoadStateJob,
117 }; 117 };
118 118
119 TestConnectJob(JobType job_type, 119 TestConnectJob(JobType job_type,
120 const std::string& group_name, 120 const std::string& group_name,
121 const TestClientSocketPoolBase::Request& request, 121 const TestClientSocketPoolBase::Request& request,
122 base::TimeDelta timeout_duration, 122 base::TimeDelta timeout_duration,
123 ConnectJob::Delegate* delegate, 123 ConnectJob::Delegate* delegate,
124 MockClientSocketFactory* client_socket_factory, 124 MockClientSocketFactory* client_socket_factory,
125 const BoundNetLog& net_log) 125 NetLog* net_log)
126 : ConnectJob(group_name, timeout_duration, delegate, net_log), 126 : ConnectJob(group_name, timeout_duration, delegate,
127 BoundNetLog::Make(net_log, NetLog::SOURCE_CONNECT_JOB)),
127 job_type_(job_type), 128 job_type_(job_type),
128 client_socket_factory_(client_socket_factory), 129 client_socket_factory_(client_socket_factory),
129 method_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), 130 method_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
130 load_state_(LOAD_STATE_IDLE) {} 131 load_state_(LOAD_STATE_IDLE) {}
131 132
132 void Signal() { 133 void Signal() {
133 DoConnect(waiting_success_, true /* async */); 134 DoConnect(waiting_success_, true /* async */);
134 } 135 }
135 136
136 virtual LoadState GetLoadState() const { return load_state_; } 137 virtual LoadState GetLoadState() const { return load_state_; }
(...skipping 111 matching lines...)
248 249
249 void set_timeout_duration(base::TimeDelta timeout_duration) { 250 void set_timeout_duration(base::TimeDelta timeout_duration) {
250 timeout_duration_ = timeout_duration; 251 timeout_duration_ = timeout_duration;
251 } 252 }
252 253
253 // ConnectJobFactory methods: 254 // ConnectJobFactory methods:
254 255
255 virtual ConnectJob* NewConnectJob( 256 virtual ConnectJob* NewConnectJob(
256 const std::string& group_name, 257 const std::string& group_name,
257 const TestClientSocketPoolBase::Request& request, 258 const TestClientSocketPoolBase::Request& request,
258 ConnectJob::Delegate* delegate, 259 ConnectJob::Delegate* delegate) const {
259 const BoundNetLog& net_log) const {
260 return new TestConnectJob(job_type_, 260 return new TestConnectJob(job_type_,
261 group_name, 261 group_name,
262 request, 262 request,
263 timeout_duration_, 263 timeout_duration_,
264 delegate, 264 delegate,
265 client_socket_factory_, 265 client_socket_factory_,
266 net_log); 266 NULL);
267 } 267 }
268 268
269 virtual base::TimeDelta ConnectionTimeout() const { 269 virtual base::TimeDelta ConnectionTimeout() const {
270 return timeout_duration_; 270 return timeout_duration_;
271 } 271 }
272 272
273 private: 273 private:
274 TestConnectJob::JobType job_type_; 274 TestConnectJob::JobType job_type_;
275 base::TimeDelta timeout_duration_; 275 base::TimeDelta timeout_duration_;
276 MockClientSocketFactory* const client_socket_factory_; 276 MockClientSocketFactory* const client_socket_factory_;
(...skipping 200 matching lines...)
477 ClientSocketHandle ignored; 477 ClientSocketHandle ignored;
478 TestClientSocketPoolBase::Request request( 478 TestClientSocketPoolBase::Request request(
479 &ignored, NULL, kDefaultPriority, NULL, BoundNetLog()); 479 &ignored, NULL, kDefaultPriority, NULL, BoundNetLog());
480 scoped_ptr<TestConnectJob> job( 480 scoped_ptr<TestConnectJob> job(
481 new TestConnectJob(TestConnectJob::kMockJob, 481 new TestConnectJob(TestConnectJob::kMockJob,
482 "a", 482 "a",
483 request, 483 request,
484 base::TimeDelta::FromMicroseconds(1), 484 base::TimeDelta::FromMicroseconds(1),
485 &delegate, 485 &delegate,
486 &client_socket_factory_, 486 &client_socket_factory_,
487 BoundNetLog())); 487 NULL));
488 EXPECT_EQ(OK, job->Connect()); 488 EXPECT_EQ(OK, job->Connect());
489 } 489 }
490 490
491 TEST_F(ClientSocketPoolBaseTest, ConnectJob_TimedOut) { 491 TEST_F(ClientSocketPoolBaseTest, ConnectJob_TimedOut) {
492 TestConnectJobDelegate delegate; 492 TestConnectJobDelegate delegate;
493 ClientSocketHandle ignored; 493 ClientSocketHandle ignored;
494 CapturingBoundNetLog log(CapturingNetLog::kUnbounded); 494 CapturingNetLog log(CapturingNetLog::kUnbounded);
495 495
496 TestClientSocketPoolBase::Request request( 496 TestClientSocketPoolBase::Request request(
497 &ignored, NULL, kDefaultPriority, NULL, BoundNetLog()); 497 &ignored, NULL, kDefaultPriority, NULL, BoundNetLog());
498 // Deleted by TestConnectJobDelegate. 498 // Deleted by TestConnectJobDelegate.
499 TestConnectJob* job = 499 TestConnectJob* job =
500 new TestConnectJob(TestConnectJob::kMockPendingJob, 500 new TestConnectJob(TestConnectJob::kMockPendingJob,
501 "a", 501 "a",
502 request, 502 request,
503 base::TimeDelta::FromMicroseconds(1), 503 base::TimeDelta::FromMicroseconds(1),
504 &delegate, 504 &delegate,
505 &client_socket_factory_, 505 &client_socket_factory_,
506 log.bound()); 506 &log);
507 ASSERT_EQ(ERR_IO_PENDING, job->Connect()); 507 ASSERT_EQ(ERR_IO_PENDING, job->Connect());
508 PlatformThread::Sleep(1); 508 PlatformThread::Sleep(1);
509 EXPECT_EQ(ERR_TIMED_OUT, delegate.WaitForResult()); 509 EXPECT_EQ(ERR_TIMED_OUT, delegate.WaitForResult());
510 510
511 EXPECT_EQ(3u, log.entries().size()); 511 EXPECT_EQ(6u, log.entries().size());
512 EXPECT_TRUE(LogContainsBeginEvent( 512 EXPECT_TRUE(LogContainsBeginEvent(
513 log.entries(), 0, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB)); 513 log.entries(), 0, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB));
514 EXPECT_TRUE(LogContainsBeginEvent(
515 log.entries(), 1, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB_CONNECT));
514 EXPECT_TRUE(LogContainsEvent( 516 EXPECT_TRUE(LogContainsEvent(
515 log.entries(), 1, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB_TIMED_OUT, 517 log.entries(), 2, NetLog::TYPE_CONNECT_JOB_SET_SOCKET,
518 NetLog::PHASE_NONE));
519 EXPECT_TRUE(LogContainsEvent(
520 log.entries(), 3, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB_TIMED_OUT,
516 NetLog::PHASE_NONE)); 521 NetLog::PHASE_NONE));
517 EXPECT_TRUE(LogContainsEndEvent( 522 EXPECT_TRUE(LogContainsEndEvent(
518 log.entries(), 2, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB)); 523 log.entries(), 4, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB_CONNECT));
524 EXPECT_TRUE(LogContainsEndEvent(
525 log.entries(), 5, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB));
519 } 526 }
520 527
521 TEST_F(ClientSocketPoolBaseTest, BasicSynchronous) { 528 TEST_F(ClientSocketPoolBaseTest, BasicSynchronous) {
522 CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup); 529 CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup);
523 530
524 TestCompletionCallback callback; 531 TestCompletionCallback callback;
525 ClientSocketHandle handle; 532 ClientSocketHandle handle;
526 CapturingBoundNetLog log(CapturingNetLog::kUnbounded); 533 CapturingBoundNetLog log(CapturingNetLog::kUnbounded);
527 534
528 EXPECT_EQ(OK, InitHandle(&handle, "a", kDefaultPriority, &callback, pool_, 535 EXPECT_EQ(OK, InitHandle(&handle, "a", kDefaultPriority, &callback, pool_,
529 log.bound())); 536 log.bound()));
530 EXPECT_TRUE(handle.is_initialized()); 537 EXPECT_TRUE(handle.is_initialized());
531 EXPECT_TRUE(handle.socket()); 538 EXPECT_TRUE(handle.socket());
532 handle.Reset(); 539 handle.Reset();
533 540
534 EXPECT_EQ(7u, log.entries().size()); 541 EXPECT_EQ(4u, log.entries().size());
535 EXPECT_TRUE(LogContainsBeginEvent( 542 EXPECT_TRUE(LogContainsBeginEvent(
536 log.entries(), 0, NetLog::TYPE_SOCKET_POOL)); 543 log.entries(), 0, NetLog::TYPE_SOCKET_POOL));
537 EXPECT_TRUE(LogContainsBeginEvent(
538 log.entries(), 1, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB_ID));
539 EXPECT_TRUE(LogContainsBeginEvent(
540 log.entries(), 2, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB));
541 EXPECT_TRUE(LogContainsEndEvent(
542 log.entries(), 3, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB));
543 EXPECT_TRUE(LogContainsEndEvent(
544 log.entries(), 4, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB_ID));
545 EXPECT_TRUE(LogContainsEvent( 544 EXPECT_TRUE(LogContainsEvent(
546 log.entries(), 5, NetLog::TYPE_SOCKET_POOL_SOCKET_ID, 545 log.entries(), 1, NetLog::TYPE_SOCKET_POOL_BOUND_TO_CONNECT_JOB,
546 NetLog::PHASE_NONE));
547 EXPECT_TRUE(LogContainsEvent(
548 log.entries(), 2, NetLog::TYPE_SOCKET_POOL_BOUND_TO_SOCKET,
547 NetLog::PHASE_NONE)); 549 NetLog::PHASE_NONE));
548 EXPECT_TRUE(LogContainsEndEvent( 550 EXPECT_TRUE(LogContainsEndEvent(
549 log.entries(), 6, NetLog::TYPE_SOCKET_POOL)); 551 log.entries(), 3, NetLog::TYPE_SOCKET_POOL));
550 } 552 }
551 553
552 TEST_F(ClientSocketPoolBaseTest, InitConnectionFailure) { 554 TEST_F(ClientSocketPoolBaseTest, InitConnectionFailure) {
553 CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup); 555 CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup);
554 556
555 connect_job_factory_->set_job_type(TestConnectJob::kMockFailingJob); 557 connect_job_factory_->set_job_type(TestConnectJob::kMockFailingJob);
556 CapturingBoundNetLog log(CapturingNetLog::kUnbounded); 558 CapturingBoundNetLog log(CapturingNetLog::kUnbounded);
557 559
558 TestSocketRequest req(&request_order_, &completion_count_); 560 TestSocketRequest req(&request_order_, &completion_count_);
559 EXPECT_EQ(ERR_CONNECTION_FAILED, 561 EXPECT_EQ(ERR_CONNECTION_FAILED,
560 InitHandle(req.handle(), "a", kDefaultPriority, &req, pool_, 562 InitHandle(req.handle(), "a", kDefaultPriority, &req, pool_,
561 log.bound())); 563 log.bound()));
562 564
563 EXPECT_EQ(6u, log.entries().size()); 565 EXPECT_EQ(3u, log.entries().size());
564 EXPECT_TRUE(LogContainsBeginEvent( 566 EXPECT_TRUE(LogContainsBeginEvent(
565 log.entries(), 0, NetLog::TYPE_SOCKET_POOL)); 567 log.entries(), 0, NetLog::TYPE_SOCKET_POOL));
566 EXPECT_TRUE(LogContainsBeginEvent( 568 EXPECT_TRUE(LogContainsEvent(
567 log.entries(), 2, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB)); 569 log.entries(), 1, NetLog::TYPE_SOCKET_POOL_BOUND_TO_CONNECT_JOB,
570 NetLog::PHASE_NONE));
568 EXPECT_TRUE(LogContainsEndEvent( 571 EXPECT_TRUE(LogContainsEndEvent(
569 log.entries(), 3, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB)); 572 log.entries(), 2, NetLog::TYPE_SOCKET_POOL));
570 EXPECT_TRUE(LogContainsEndEvent(log.entries(), 5, NetLog::TYPE_SOCKET_POOL));
571 } 573 }
572 574
573 TEST_F(ClientSocketPoolBaseTest, TotalLimit) { 575 TEST_F(ClientSocketPoolBaseTest, TotalLimit) {
574 CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup); 576 CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup);
575 577
576 // TODO(eroman): Check that the NetLog contains this event. 578 // TODO(eroman): Check that the NetLog contains this event.
577 579
578 EXPECT_EQ(OK, StartRequest("a", kDefaultPriority)); 580 EXPECT_EQ(OK, StartRequest("a", kDefaultPriority));
579 EXPECT_EQ(OK, StartRequest("b", kDefaultPriority)); 581 EXPECT_EQ(OK, StartRequest("b", kDefaultPriority));
580 EXPECT_EQ(OK, StartRequest("c", kDefaultPriority)); 582 EXPECT_EQ(OK, StartRequest("c", kDefaultPriority));
(...skipping 617 matching lines...)
1198 TestSocketRequest req(&request_order_, &completion_count_); 1200 TestSocketRequest req(&request_order_, &completion_count_);
1199 CapturingBoundNetLog log(CapturingNetLog::kUnbounded); 1201 CapturingBoundNetLog log(CapturingNetLog::kUnbounded);
1200 int rv = InitHandle(req.handle(), "a", LOWEST, &req, pool_, log.bound()); 1202 int rv = InitHandle(req.handle(), "a", LOWEST, &req, pool_, log.bound());
1201 EXPECT_EQ(ERR_IO_PENDING, rv); 1203 EXPECT_EQ(ERR_IO_PENDING, rv);
1202 EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", req.handle())); 1204 EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", req.handle()));
1203 EXPECT_EQ(OK, req.WaitForResult()); 1205 EXPECT_EQ(OK, req.WaitForResult());
1204 EXPECT_TRUE(req.handle()->is_initialized()); 1206 EXPECT_TRUE(req.handle()->is_initialized());
1205 EXPECT_TRUE(req.handle()->socket()); 1207 EXPECT_TRUE(req.handle()->socket());
1206 req.handle()->Reset(); 1208 req.handle()->Reset();
1207 1209
1208 EXPECT_EQ(7u, log.entries().size()); 1210 EXPECT_EQ(4u, log.entries().size());
1209 EXPECT_TRUE(LogContainsBeginEvent( 1211 EXPECT_TRUE(LogContainsBeginEvent(
1210 log.entries(), 0, NetLog::TYPE_SOCKET_POOL)); 1212 log.entries(), 0, NetLog::TYPE_SOCKET_POOL));
1211 EXPECT_TRUE(LogContainsBeginEvent( 1213 EXPECT_TRUE(LogContainsEvent(
1212 log.entries(), 2, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB)); 1214 log.entries(), 1, NetLog::TYPE_SOCKET_POOL_BOUND_TO_CONNECT_JOB,
1215 NetLog::PHASE_NONE));
1216 EXPECT_TRUE(LogContainsEvent(
1217 log.entries(), 2, NetLog::TYPE_SOCKET_POOL_BOUND_TO_SOCKET,
1218 NetLog::PHASE_NONE));
1213 EXPECT_TRUE(LogContainsEndEvent( 1219 EXPECT_TRUE(LogContainsEndEvent(
1214 log.entries(), 3, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB)); 1220 log.entries(), 3, NetLog::TYPE_SOCKET_POOL));
1215 EXPECT_TRUE(LogContainsEndEvent(
1216 log.entries(), 5, NetLog::TYPE_SOCKET_POOL));
1217 } 1221 }
1218 1222
1219 TEST_F(ClientSocketPoolBaseTest, 1223 TEST_F(ClientSocketPoolBaseTest,
1220 InitConnectionAsynchronousFailure) { 1224 InitConnectionAsynchronousFailure) {
1221 CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup); 1225 CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup);
1222 1226
1223 connect_job_factory_->set_job_type(TestConnectJob::kMockPendingFailingJob); 1227 connect_job_factory_->set_job_type(TestConnectJob::kMockPendingFailingJob);
1224 TestSocketRequest req(&request_order_, &completion_count_); 1228 TestSocketRequest req(&request_order_, &completion_count_);
1225 CapturingBoundNetLog log(CapturingNetLog::kUnbounded); 1229 CapturingBoundNetLog log(CapturingNetLog::kUnbounded);
1226 EXPECT_EQ(ERR_IO_PENDING, 1230 EXPECT_EQ(ERR_IO_PENDING,
1227 InitHandle(req.handle(), "a", kDefaultPriority, &req, pool_, 1231 InitHandle(req.handle(), "a", kDefaultPriority, &req, pool_,
1228 log.bound())); 1232 log.bound()));
1229 EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", req.handle())); 1233 EXPECT_EQ(LOAD_STATE_CONNECTING, pool_->GetLoadState("a", req.handle()));
1230 EXPECT_EQ(ERR_CONNECTION_FAILED, req.WaitForResult()); 1234 EXPECT_EQ(ERR_CONNECTION_FAILED, req.WaitForResult());
1231 1235
1232 EXPECT_EQ(6u, log.entries().size()); 1236 EXPECT_EQ(3u, log.entries().size());
1233 EXPECT_TRUE(LogContainsBeginEvent( 1237 EXPECT_TRUE(LogContainsBeginEvent(
1234 log.entries(), 0, NetLog::TYPE_SOCKET_POOL)); 1238 log.entries(), 0, NetLog::TYPE_SOCKET_POOL));
1235 EXPECT_TRUE(LogContainsBeginEvent( 1239 EXPECT_TRUE(LogContainsEvent(
1236 log.entries(), 2, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB)); 1240 log.entries(), 1, NetLog::TYPE_SOCKET_POOL_BOUND_TO_CONNECT_JOB,
1241 NetLog::PHASE_NONE));
1237 EXPECT_TRUE(LogContainsEndEvent( 1242 EXPECT_TRUE(LogContainsEndEvent(
1238 log.entries(), 3, NetLog::TYPE_SOCKET_POOL_CONNECT_JOB)); 1243 log.entries(), 2, NetLog::TYPE_SOCKET_POOL));
1239 EXPECT_TRUE(LogContainsEndEvent(
1240 log.entries(), 5, NetLog::TYPE_SOCKET_POOL));
1241 } 1244 }
1242 1245
1243 TEST_F(ClientSocketPoolBaseTest, TwoRequestsCancelOne) { 1246 TEST_F(ClientSocketPoolBaseTest, TwoRequestsCancelOne) {
1244 // TODO(eroman): Add back the log expectations! Removed them because the 1247 // TODO(eroman): Add back the log expectations! Removed them because the
1245 // ordering is difficult, and some may fire during destructor. 1248 // ordering is difficult, and some may fire during destructor.
1246 CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup); 1249 CreatePool(kDefaultMaxSockets, kDefaultMaxSocketsPerGroup);
1247 1250
1248 connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob); 1251 connect_job_factory_->set_job_type(TestConnectJob::kMockPendingJob);
1249 TestSocketRequest req(&request_order_, &completion_count_); 1252 TestSocketRequest req(&request_order_, &completion_count_);
1250 TestSocketRequest req2(&request_order_, &completion_count_); 1253 TestSocketRequest req2(&request_order_, &completion_count_);
(...skipping 377 matching lines...)
1628 TestReleasingSocketRequest request(pool_.get()); 1631 TestReleasingSocketRequest request(pool_.get());
1629 EXPECT_EQ(ERR_IO_PENDING, InitHandle(request.handle(), "a", kDefaultPriority, 1632 EXPECT_EQ(ERR_IO_PENDING, InitHandle(request.handle(), "a", kDefaultPriority,
1630 &request, pool_, BoundNetLog())); 1633 &request, pool_, BoundNetLog()));
1631 1634
1632 EXPECT_EQ(OK, request.WaitForResult()); 1635 EXPECT_EQ(OK, request.WaitForResult());
1633 } 1636 }
1634 1637
1635 } // namespace 1638 } // namespace
1636 1639
1637 } // namespace net 1640 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/client_socket_pool_base.cc ('k') | net/socket/socks_client_socket_pool.h » ('j') | no next file with comments »

Powered by Google App Engine