OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 10777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
10788 data_writes2, arraysize(data_writes2)); | 10788 data_writes2, arraysize(data_writes2)); |
10789 StaticSocketDataProvider* data[] = { &data1, &data2 }; | 10789 StaticSocketDataProvider* data[] = { &data1, &data2 }; |
10790 | 10790 |
10791 SimpleGetHelperResult out = SimpleGetHelperForData(data, arraysize(data)); | 10791 SimpleGetHelperResult out = SimpleGetHelperForData(data, arraysize(data)); |
10792 | 10792 |
10793 EXPECT_EQ(OK, out.rv); | 10793 EXPECT_EQ(OK, out.rv); |
10794 EXPECT_EQ("HTTP/1.0 200 OK", out.status_line); | 10794 EXPECT_EQ("HTTP/1.0 200 OK", out.status_line); |
10795 EXPECT_EQ("hello world", out.response_data); | 10795 EXPECT_EQ("hello world", out.response_data); |
10796 } | 10796 } |
10797 | 10797 |
10798 | |
Ryan Sleevi
2013/08/05 22:23:03
Um... do you actually need this? :)
danakj
2013/08/05 22:33:31
Oh, heh. :)
| |
10798 TEST_P(HttpNetworkTransactionTest, DoNotUseSpdySessionForHttp) { | 10799 TEST_P(HttpNetworkTransactionTest, DoNotUseSpdySessionForHttp) { |
10799 const std::string https_url = "https://www.google.com/"; | 10800 const std::string https_url = "https://www.google.com/"; |
10800 const std::string http_url = "http://www.google.com:443/"; | 10801 const std::string http_url = "http://www.google.com:443/"; |
10801 | 10802 |
10802 // SPDY GET for HTTPS URL | 10803 // SPDY GET for HTTPS URL |
10803 scoped_ptr<SpdyFrame> req1( | 10804 scoped_ptr<SpdyFrame> req1( |
10804 spdy_util_.ConstructSpdyGet(https_url.c_str(), false, 1, LOWEST)); | 10805 spdy_util_.ConstructSpdyGet(https_url.c_str(), false, 1, LOWEST)); |
10805 | 10806 |
10806 MockWrite writes1[] = { | 10807 MockWrite writes1[] = { |
10807 CreateMockWrite(*req1, 0), | 10808 CreateMockWrite(*req1, 0), |
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
11674 EXPECT_EQ(OK, rv); | 11675 EXPECT_EQ(OK, rv); |
11675 | 11676 |
11676 HttpRequestHeaders request_headers; | 11677 HttpRequestHeaders request_headers; |
11677 EXPECT_TRUE(trans->GetFullRequestHeaders(&request_headers)); | 11678 EXPECT_TRUE(trans->GetFullRequestHeaders(&request_headers)); |
11678 std::string foo; | 11679 std::string foo; |
11679 EXPECT_TRUE(request_headers.GetHeader("X-Foo", &foo)); | 11680 EXPECT_TRUE(request_headers.GetHeader("X-Foo", &foo)); |
11680 EXPECT_EQ("bar", foo); | 11681 EXPECT_EQ("bar", foo); |
11681 } | 11682 } |
11682 | 11683 |
11683 } // namespace net | 11684 } // namespace net |
OLD | NEW |