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

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

Issue 6488010: Propagate the remote socket address to URLRequest and to ViewHostMsg_FrameNavigate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use HostPortPair everywhere Created 9 years, 10 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) 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/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 <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 out.rv = callback.WaitForResult(); 168 out.rv = callback.WaitForResult();
169 if (out.rv != OK) 169 if (out.rv != OK)
170 return out; 170 return out;
171 171
172 const HttpResponseInfo* response = trans->GetResponseInfo(); 172 const HttpResponseInfo* response = trans->GetResponseInfo();
173 EXPECT_TRUE(response != NULL); 173 EXPECT_TRUE(response != NULL);
174 174
175 EXPECT_TRUE(response->headers != NULL); 175 EXPECT_TRUE(response->headers != NULL);
176 out.status_line = response->headers->GetStatusLine(); 176 out.status_line = response->headers->GetStatusLine();
177 177
178 EXPECT_EQ("192.0.2.33", response->socket_address.host());
179 EXPECT_EQ(0, response->socket_address.port());
180
178 rv = ReadTransaction(trans.get(), &out.response_data); 181 rv = ReadTransaction(trans.get(), &out.response_data);
179 EXPECT_EQ(OK, rv); 182 EXPECT_EQ(OK, rv);
180 183
181 net::CapturingNetLog::EntryList entries; 184 net::CapturingNetLog::EntryList entries;
182 log.GetEntries(&entries); 185 log.GetEntries(&entries);
183 size_t pos = ExpectLogContainsSomewhere( 186 size_t pos = ExpectLogContainsSomewhere(
184 entries, 0, NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST_HEADERS, 187 entries, 0, NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST_HEADERS,
185 NetLog::PHASE_NONE); 188 NetLog::PHASE_NONE);
186 ExpectLogContainsSomewhere( 189 ExpectLogContainsSomewhere(
187 entries, pos, 190 entries, pos,
(...skipping 8390 matching lines...) Expand 10 before | Expand all | Expand 10 after
8578 // Now that the new handshake has failed, ensure that the client 8581 // Now that the new handshake has failed, ensure that the client
8579 // certificate was removed from the client auth cache. 8582 // certificate was removed from the client auth cache.
8580 ASSERT_FALSE(session->ssl_client_auth_cache()->Lookup("proxy:70", 8583 ASSERT_FALSE(session->ssl_client_auth_cache()->Lookup("proxy:70",
8581 &client_cert)); 8584 &client_cert));
8582 ASSERT_FALSE(session->ssl_client_auth_cache()->Lookup("www.example.com:443", 8585 ASSERT_FALSE(session->ssl_client_auth_cache()->Lookup("www.example.com:443",
8583 &client_cert)); 8586 &client_cert));
8584 } 8587 }
8585 } 8588 }
8586 8589
8587 } // namespace net 8590 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698