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

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: 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:0", response->socket_address);
179
178 rv = ReadTransaction(trans.get(), &out.response_data); 180 rv = ReadTransaction(trans.get(), &out.response_data);
179 EXPECT_EQ(OK, rv); 181 EXPECT_EQ(OK, rv);
180 182
181 net::CapturingNetLog::EntryList entries; 183 net::CapturingNetLog::EntryList entries;
182 log.GetEntries(&entries); 184 log.GetEntries(&entries);
183 size_t pos = ExpectLogContainsSomewhere( 185 size_t pos = ExpectLogContainsSomewhere(
184 entries, 0, NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST_HEADERS, 186 entries, 0, NetLog::TYPE_HTTP_TRANSACTION_SEND_REQUEST_HEADERS,
185 NetLog::PHASE_NONE); 187 NetLog::PHASE_NONE);
186 ExpectLogContainsSomewhere( 188 ExpectLogContainsSomewhere(
187 entries, pos, 189 entries, pos,
(...skipping 8389 matching lines...) Expand 10 before | Expand all | Expand 10 after
8577 // Now that the new handshake has failed, ensure that the client 8579 // Now that the new handshake has failed, ensure that the client
8578 // certificate was removed from the client auth cache. 8580 // certificate was removed from the client auth cache.
8579 ASSERT_FALSE(session->ssl_client_auth_cache()->Lookup("proxy:70", 8581 ASSERT_FALSE(session->ssl_client_auth_cache()->Lookup("proxy:70",
8580 &client_cert)); 8582 &client_cert));
8581 ASSERT_FALSE(session->ssl_client_auth_cache()->Lookup("www.example.com:443", 8583 ASSERT_FALSE(session->ssl_client_auth_cache()->Lookup("www.example.com:443",
8582 &client_cert)); 8584 &client_cert));
8583 } 8585 }
8584 } 8586 }
8585 8587
8586 } // namespace net 8588 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698