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

Side by Side Diff: net/spdy/spdy_proxy_client_socket_unittest.cc

Issue 16434016: Rewrite scoped_ptr<T>(NULL) to use the default ctor in net/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/spdy/spdy_proxy_client_socket.h" 5 #include "net/spdy/spdy_proxy_client_socket.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "net/base/address_list.h" 10 #include "net/base/address_list.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocketTest); 134 DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocketTest);
135 }; 135 };
136 136
137 INSTANTIATE_TEST_CASE_P(NextProto, 137 INSTANTIATE_TEST_CASE_P(NextProto,
138 SpdyProxyClientSocketTest, 138 SpdyProxyClientSocketTest,
139 testing::Values(kProtoSPDY2, kProtoSPDY3)); 139 testing::Values(kProtoSPDY2, kProtoSPDY3));
140 140
141 SpdyProxyClientSocketTest::SpdyProxyClientSocketTest() 141 SpdyProxyClientSocketTest::SpdyProxyClientSocketTest()
142 : spdy_util_(GetParam()), 142 : spdy_util_(GetParam()),
143 sock_(NULL),
144 data_(NULL),
145 session_(NULL), 143 session_(NULL),
146 read_buf_(NULL), 144 read_buf_(NULL),
147 session_deps_(GetParam()), 145 session_deps_(GetParam()),
148 connect_data_(SYNCHRONOUS, OK), 146 connect_data_(SYNCHRONOUS, OK),
149 spdy_session_(NULL), 147 spdy_session_(NULL),
150 framer_(spdy_util_.spdy_version(), false), 148 framer_(spdy_util_.spdy_version(), false),
151 user_agent_(kUserAgent), 149 user_agent_(kUserAgent),
152 url_(kRequestUrl), 150 url_(kRequestUrl),
153 proxy_host_port_(kProxyHost, kProxyPort), 151 proxy_host_port_(kProxyHost, kProxyPort),
154 endpoint_host_port_pair_(kOriginHost, kOriginPort), 152 endpoint_host_port_pair_(kOriginHost, kOriginPort),
155 proxy_(ProxyServer::SCHEME_HTTPS, proxy_host_port_), 153 proxy_(ProxyServer::SCHEME_HTTPS, proxy_host_port_),
156 endpoint_spdy_session_key_(endpoint_host_port_pair_, proxy_, 154 endpoint_spdy_session_key_(endpoint_host_port_pair_,
155 proxy_,
157 kPrivacyModeDisabled), 156 kPrivacyModeDisabled),
158 transport_params_(new TransportSocketParams(proxy_host_port_, 157 transport_params_(new TransportSocketParams(proxy_host_port_,
159 LOWEST, 158 LOWEST,
160 false, 159 false,
161 false, 160 false,
162 OnHostResolutionCallback())) { 161 OnHostResolutionCallback())) {
163 session_deps_.net_log = net_log_.bound().net_log(); 162 session_deps_.net_log = net_log_.bound().net_log();
164 } 163 }
165 164
166 void SpdyProxyClientSocketTest::TearDown() { 165 void SpdyProxyClientSocketTest::TearDown() {
(...skipping 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1438 write_buf.get(), write_buf->size(), write_callback_.callback())); 1437 write_buf.get(), write_buf->size(), write_callback_.callback()));
1439 1438
1440 Run(2); 1439 Run(2);
1441 1440
1442 EXPECT_FALSE(sock_.get()); 1441 EXPECT_FALSE(sock_.get());
1443 EXPECT_TRUE(read_callback.have_result()); 1442 EXPECT_TRUE(read_callback.have_result());
1444 EXPECT_FALSE(write_callback_.have_result()); 1443 EXPECT_FALSE(write_callback_.have_result());
1445 } 1444 }
1446 1445
1447 } // namespace net 1446 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/tcp_listen_socket_unittest.cc ('k') | net/test/embedded_test_server/embedded_test_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698