| Index: net/socket/socket_test_util.cc
|
| diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc
|
| index 79b7a34e2698bd72a372debd33242766438df360..560fadbf97350d9ca7ad985e537b650352e5e6da 100644
|
| --- a/net/socket/socket_test_util.cc
|
| +++ b/net/socket/socket_test_util.cc
|
| @@ -1981,9 +1981,9 @@ MockTransportClientSocketPool::MockConnectJob::~MockConnectJob() {}
|
| int MockTransportClientSocketPool::MockConnectJob::Connect() {
|
| int rv = socket_->Connect(base::Bind(&MockConnectJob::OnConnect,
|
| base::Unretained(this)));
|
| - if (rv == OK) {
|
| + if (rv != ERR_IO_PENDING) {
|
| user_callback_.Reset();
|
| - OnConnect(OK);
|
| + OnConnect(rv);
|
| }
|
| return rv;
|
| }
|
| @@ -2015,6 +2015,11 @@ void MockTransportClientSocketPool::MockConnectJob::OnConnect(int rv) {
|
| handle_->set_connect_timing(connect_timing);
|
| } else {
|
| socket_.reset();
|
| +
|
| + // Needed to test copying of ConnectionAttempts in SSL ConnectJob.
|
| + ConnectionAttempts attempts;
|
| + attempts.push_back(ConnectionAttempt(IPEndPoint(), rv));
|
| + handle_->set_connection_attempts(attempts);
|
| }
|
|
|
| handle_ = NULL;
|
|
|