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

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

Issue 10309002: Reimplements net::AddressList without struct addrinfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: get_canonical_name -> canonical_name. iterator to indexing Created 8 years, 7 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/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 #include <stdarg.h> 8 #include <stdarg.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 9225 matching lines...) Expand 10 before | Expand all | Expand 10 after
9236 BoundNetLog()); 9236 BoundNetLog());
9237 if (rv == ERR_IO_PENDING) 9237 if (rv == ERR_IO_PENDING)
9238 rv = callback.WaitForResult(); 9238 rv = callback.WaitForResult();
9239 DCHECK_EQ(OK, rv); 9239 DCHECK_EQ(OK, rv);
9240 9240
9241 // Add the first address as an alias. It would have been better to call 9241 // Add the first address as an alias. It would have been better to call
9242 // MockClientSocket::GetPeerAddress but that returns 192.0.2.33 whereas 9242 // MockClientSocket::GetPeerAddress but that returns 192.0.2.33 whereas
9243 // MockHostResolver returns 127.0.0.1 (MockHostResolverBase::Reset). So we use 9243 // MockHostResolver returns 127.0.0.1 (MockHostResolverBase::Reset). So we use
9244 // the first address (127.0.0.1) returned by MockHostResolver as an alias for 9244 // the first address (127.0.0.1) returned by MockHostResolver as an alias for
9245 // the |pair|. 9245 // the |pair|.
9246 const addrinfo* address = addresses.head(); 9246 pool_peer->AddAlias(addresses.front(), pair);
9247 pool_peer->AddAlias(address, pair);
9248 } 9247 }
9249 9248
9250 } // namespace 9249 } // namespace
9251 9250
9252 TEST_F(HttpNetworkTransactionSpdy2Test, FLAKY_UseIPConnectionPooling) { 9251 TEST_F(HttpNetworkTransactionSpdy2Test, FLAKY_UseIPConnectionPooling) {
9253 HttpStreamFactory::set_use_alternate_protocols(true); 9252 HttpStreamFactory::set_use_alternate_protocols(true);
9254 HttpStreamFactory::SetNextProtos(SpdyNextProtos()); 9253 HttpStreamFactory::SetNextProtos(SpdyNextProtos());
9255 9254
9256 // Set up a special HttpNetworkSession with a MockCachingHostResolver. 9255 // Set up a special HttpNetworkSession with a MockCachingHostResolver.
9257 SessionDependencies session_deps; 9256 SessionDependencies session_deps;
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
9550 StaticSocketDataProvider* data[] = { &data1, &data2 }; 9549 StaticSocketDataProvider* data[] = { &data1, &data2 };
9551 9550
9552 SimpleGetHelperResult out = SimpleGetHelperForData(data, arraysize(data)); 9551 SimpleGetHelperResult out = SimpleGetHelperForData(data, arraysize(data));
9553 9552
9554 EXPECT_EQ(OK, out.rv); 9553 EXPECT_EQ(OK, out.rv);
9555 EXPECT_EQ("HTTP/1.0 200 OK", out.status_line); 9554 EXPECT_EQ("HTTP/1.0 200 OK", out.status_line);
9556 EXPECT_EQ("hello world", out.response_data); 9555 EXPECT_EQ("hello world", out.response_data);
9557 } 9556 }
9558 9557
9559 } // namespace net 9558 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_negotiate.cc ('k') | net/http/http_network_transaction_spdy3_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698