OLD | NEW |
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 "net/http/http_network_transaction.h" | 5 #include "net/http/http_network_transaction.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "net/base/auth.h" | 10 #include "net/base/auth.h" |
(...skipping 4181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4192 spdy::INVALID, // Status | 4192 spdy::INVALID, // Status |
4193 NULL, // Data | 4193 NULL, // Data |
4194 0, // Data Length | 4194 0, // Data Length |
4195 spdy::DATA_FLAG_NONE // Data Flags | 4195 spdy::DATA_FLAG_NONE // Data Flags |
4196 }; | 4196 }; |
4197 static const char* const kExtraHeaders[] = { | 4197 static const char* const kExtraHeaders[] = { |
4198 "status", "200", | 4198 "status", "200", |
4199 "version", "HTTP/1.1" | 4199 "version", "HTTP/1.1" |
4200 }; | 4200 }; |
4201 | 4201 |
4202 NormalSpdyTransactionHelper helper(CreateGetRequest(), | 4202 BoundNetLog net_log; |
4203 BoundNetLog(), GetParam()); | 4203 NormalSpdyTransactionHelper helper(CreateGetRequest(), net_log, GetParam()); |
4204 helper.RunPreTestSetup(); | 4204 helper.RunPreTestSetup(); |
4205 | 4205 |
4206 // Verify that no settings exist initially. | 4206 // Verify that no settings exist initially. |
4207 HostPortPair host_port_pair("www.google.com", helper.port()); | 4207 HostPortPair host_port_pair("www.google.com", helper.port()); |
4208 SpdySessionPool* spdy_session_pool = helper.session()->spdy_session_pool(); | 4208 SpdySessionPool* spdy_session_pool = helper.session()->spdy_session_pool(); |
4209 EXPECT_TRUE(spdy_session_pool->http_server_properties()->GetSpdySettings( | 4209 EXPECT_TRUE(spdy_session_pool->http_server_properties()->GetSpdySettings( |
4210 host_port_pair).empty()); | 4210 host_port_pair).empty()); |
4211 | 4211 |
4212 // Construct the request. | 4212 // Construct the request. |
4213 scoped_ptr<spdy::SpdyFrame> req(ConstructSpdyGet(NULL, 0, false, 1, LOWEST)); | 4213 scoped_ptr<spdy::SpdyFrame> req(ConstructSpdyGet(NULL, 0, false, 1, LOWEST)); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4303 spdy::INVALID, // Status | 4303 spdy::INVALID, // Status |
4304 NULL, // Data | 4304 NULL, // Data |
4305 0, // Data Length | 4305 0, // Data Length |
4306 spdy::DATA_FLAG_NONE // Data Flags | 4306 spdy::DATA_FLAG_NONE // Data Flags |
4307 }; | 4307 }; |
4308 static const char* kExtraHeaders[] = { | 4308 static const char* kExtraHeaders[] = { |
4309 "status", "200", | 4309 "status", "200", |
4310 "version", "HTTP/1.1" | 4310 "version", "HTTP/1.1" |
4311 }; | 4311 }; |
4312 | 4312 |
4313 NormalSpdyTransactionHelper helper(CreateGetRequest(), | 4313 BoundNetLog net_log; |
4314 BoundNetLog(), GetParam()); | 4314 NormalSpdyTransactionHelper helper(CreateGetRequest(), net_log, GetParam()); |
4315 helper.RunPreTestSetup(); | 4315 helper.RunPreTestSetup(); |
4316 | 4316 |
4317 // Verify that no settings exist initially. | 4317 // Verify that no settings exist initially. |
4318 HostPortPair host_port_pair("www.google.com", helper.port()); | 4318 HostPortPair host_port_pair("www.google.com", helper.port()); |
4319 SpdySessionPool* spdy_session_pool = helper.session()->spdy_session_pool(); | 4319 SpdySessionPool* spdy_session_pool = helper.session()->spdy_session_pool(); |
4320 EXPECT_TRUE(spdy_session_pool->http_server_properties()->GetSpdySettings( | 4320 EXPECT_TRUE(spdy_session_pool->http_server_properties()->GetSpdySettings( |
4321 host_port_pair).empty()); | 4321 host_port_pair).empty()); |
4322 | 4322 |
4323 unsigned int kSampleId1 = 0x1; | 4323 unsigned int kSampleId1 = 0x1; |
4324 unsigned int kSampleValue1 = 0x0a0a0a0a; | 4324 unsigned int kSampleValue1 = 0x0a0a0a0a; |
(...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5662 << " Write index: " | 5662 << " Write index: " |
5663 << data->write_index(); | 5663 << data->write_index(); |
5664 | 5664 |
5665 // Verify the SYN_REPLY. | 5665 // Verify the SYN_REPLY. |
5666 HttpResponseInfo response = *trans->GetResponseInfo(); | 5666 HttpResponseInfo response = *trans->GetResponseInfo(); |
5667 EXPECT_TRUE(response.headers != NULL); | 5667 EXPECT_TRUE(response.headers != NULL); |
5668 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine()); | 5668 EXPECT_EQ("HTTP/1.1 200 OK", response.headers->GetStatusLine()); |
5669 } | 5669 } |
5670 | 5670 |
5671 } // namespace net | 5671 } // namespace net |
OLD | NEW |