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

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

Issue 6369003: New extension API: "tab.socketAddress" (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "net/base/auth.h" 8 #include "net/base/auth.h"
9 #include "net/base/net_log_unittest.h" 9 #include "net/base/net_log_unittest.h"
10 #include "net/http/http_network_session_peer.h" 10 #include "net/http/http_network_session_peer.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } else { 167 } else {
168 EXPECT_TRUE(!response->was_npn_negotiated); 168 EXPECT_TRUE(!response->was_npn_negotiated);
169 EXPECT_TRUE(!response->was_alternate_protocol_available); 169 EXPECT_TRUE(!response->was_alternate_protocol_available);
170 } 170 }
171 // If SPDY is not enabled, a HTTP request should not be diverted 171 // If SPDY is not enabled, a HTTP request should not be diverted
172 // over a SSL session. 172 // over a SSL session.
173 if (!spdy_enabled_) { 173 if (!spdy_enabled_) {
174 EXPECT_EQ(request_.url.SchemeIs("https"), 174 EXPECT_EQ(request_.url.SchemeIs("https"),
175 response->was_npn_negotiated); 175 response->was_npn_negotiated);
176 } 176 }
177 EXPECT_EQ("192.0.2.33:0", response->socket_address);
177 output_.status_line = response->headers->GetStatusLine(); 178 output_.status_line = response->headers->GetStatusLine();
178 output_.response_info = *response; // Make a copy so we can verify. 179 output_.response_info = *response; // Make a copy so we can verify.
179 output_.rv = ReadTransaction(trans_.get(), &output_.response_data); 180 output_.rv = ReadTransaction(trans_.get(), &output_.response_data);
180 return; 181 return;
181 } 182 }
182 183
183 // Most tests will want to call this function. In particular, the MockReads 184 // Most tests will want to call this function. In particular, the MockReads
184 // should end with an empty read, and that read needs to be processed to 185 // should end with an empty read, and that read needs to be processed to
185 // ensure proper deletion of the spdy_session_pool. 186 // ensure proper deletion of the spdy_session_pool.
186 void VerifyDataConsumed() { 187 void VerifyDataConsumed() {
(...skipping 5219 matching lines...) Expand 10 before | Expand all | Expand 10 after
5406 5407
5407 VerifyStreamsClosed(helper); 5408 VerifyStreamsClosed(helper);
5408 5409
5409 // Verify the SYN_REPLY. 5410 // Verify the SYN_REPLY.
5410 EXPECT_TRUE(response.headers != NULL); 5411 EXPECT_TRUE(response.headers != NULL);
5411 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine()); 5412 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine());
5412 } 5413 }
5413 } 5414 }
5414 5415
5415 } // namespace net 5416 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698