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

Side by Side Diff: net/http/http_proxy_client_socket_pool_spdy3_unittest.cc

Issue 10796085: Give MockRead and MockWrite distinct types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and fix compile. Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_proxy_client_socket_pool_spdy2_unittest.cc ('k') | net/socket/socket_test_util.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) 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/http/http_proxy_client_socket_pool.h" 5 #include "net/http/http_proxy_client_socket_pool.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/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 ConstructSpdyControlFrame(NULL, 273 ConstructSpdyControlFrame(NULL,
274 0, 274 0,
275 false, 275 false,
276 1, 276 1,
277 LOWEST, 277 LOWEST,
278 SYN_REPLY, 278 SYN_REPLY,
279 CONTROL_FLAG_NONE, 279 CONTROL_FLAG_NONE,
280 kAuthChallenge, 280 kAuthChallenge,
281 arraysize(kAuthChallenge))); 281 arraysize(kAuthChallenge)));
282 MockRead spdy_reads[] = { 282 MockRead spdy_reads[] = {
283 CreateMockWrite(*resp, 1, ASYNC), 283 CreateMockRead(*resp, 1, ASYNC),
284 MockRead(ASYNC, 0, 3) 284 MockRead(ASYNC, 0, 3)
285 }; 285 };
286 286
287 Initialize(reads, arraysize(reads), writes, arraysize(writes), 287 Initialize(reads, arraysize(reads), writes, arraysize(writes),
288 spdy_reads, arraysize(spdy_reads), spdy_writes, 288 spdy_reads, arraysize(spdy_reads), spdy_writes,
289 arraysize(spdy_writes)); 289 arraysize(spdy_writes));
290 290
291 data_->StopAfter(4); 291 data_->StopAfter(4);
292 int rv = handle_.Init("a", GetTunnelParams(), LOW, callback_.callback(), 292 int rv = handle_.Init("a", GetTunnelParams(), LOW, callback_.callback(),
293 &pool_, BoundNetLog()); 293 &pool_, BoundNetLog());
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 // HTTPS or SPDY Proxy CONNECT responses are trustworthy 539 // HTTPS or SPDY Proxy CONNECT responses are trustworthy
540 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv); 540 EXPECT_EQ(ERR_HTTPS_PROXY_TUNNEL_RESPONSE, rv);
541 EXPECT_TRUE(handle_.is_initialized()); 541 EXPECT_TRUE(handle_.is_initialized());
542 EXPECT_TRUE(handle_.socket()); 542 EXPECT_TRUE(handle_.socket());
543 } 543 }
544 } 544 }
545 545
546 // It would be nice to also test the timeouts in HttpProxyClientSocketPool. 546 // It would be nice to also test the timeouts in HttpProxyClientSocketPool.
547 547
548 } // namespace net 548 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_proxy_client_socket_pool_spdy2_unittest.cc ('k') | net/socket/socket_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698