OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/bidirectional_stream.h" | 5 #include "net/http/bidirectional_stream.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
12 #include "base/strings/string_number_conversions.h" | 12 #include "base/strings/string_number_conversions.h" |
13 #include "base/strings/string_piece.h" | 13 #include "base/strings/string_piece.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "base/timer/mock_timer.h" | 15 #include "base/timer/mock_timer.h" |
16 #include "net/base/net_errors.h" | 16 #include "net/base/net_errors.h" |
17 #include "net/base/test_data_directory.h" | |
18 #include "net/http/bidirectional_stream_request_info.h" | 17 #include "net/http/bidirectional_stream_request_info.h" |
19 #include "net/http/http_network_session.h" | 18 #include "net/http/http_network_session.h" |
20 #include "net/http/http_response_headers.h" | 19 #include "net/http/http_response_headers.h" |
21 #include "net/http/http_server_properties.h" | 20 #include "net/http/http_server_properties.h" |
22 #include "net/log/net_log.h" | 21 #include "net/log/net_log.h" |
23 #include "net/log/test_net_log.h" | 22 #include "net/log/test_net_log.h" |
24 #include "net/log/test_net_log_util.h" | 23 #include "net/log/test_net_log_util.h" |
25 #include "net/socket/socket_test_util.h" | 24 #include "net/socket/socket_test_util.h" |
26 #include "net/spdy/spdy_session.h" | 25 #include "net/spdy/spdy_session.h" |
27 #include "net/spdy/spdy_test_util_common.h" | 26 #include "net/spdy/spdy_test_util_common.h" |
28 #include "net/test/cert_test_util.h" | 27 #include "net/test/cert_test_util.h" |
| 28 #include "net/test/test_data_directory.h" |
29 #include "net/url_request/url_request_test_util.h" | 29 #include "net/url_request/url_request_test_util.h" |
30 #include "testing/gtest/include/gtest/gtest.h" | 30 #include "testing/gtest/include/gtest/gtest.h" |
31 | 31 |
32 namespace net { | 32 namespace net { |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
36 const char kBodyData[] = "Body data"; | 36 const char kBodyData[] = "Body data"; |
37 const size_t kBodyDataSize = arraysize(kBodyData); | 37 const size_t kBodyDataSize = arraysize(kBodyData); |
38 // Size of the buffer to be allocated for each read. | 38 // Size of the buffer to be allocated for each read. |
(...skipping 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1578 AlternativeServiceVector alternative_service_vector = | 1578 AlternativeServiceVector alternative_service_vector = |
1579 http_session_->http_server_properties()->GetAlternativeServices(server); | 1579 http_session_->http_server_properties()->GetAlternativeServices(server); |
1580 ASSERT_EQ(1u, alternative_service_vector.size()); | 1580 ASSERT_EQ(1u, alternative_service_vector.size()); |
1581 EXPECT_EQ(AlternateProtocolFromNextProto(kProtoQUIC1SPDY3), | 1581 EXPECT_EQ(AlternateProtocolFromNextProto(kProtoQUIC1SPDY3), |
1582 alternative_service_vector[0].protocol); | 1582 alternative_service_vector[0].protocol); |
1583 EXPECT_EQ("www.example.org", alternative_service_vector[0].host); | 1583 EXPECT_EQ("www.example.org", alternative_service_vector[0].host); |
1584 EXPECT_EQ(443, alternative_service_vector[0].port); | 1584 EXPECT_EQ(443, alternative_service_vector[0].port); |
1585 } | 1585 } |
1586 | 1586 |
1587 } // namespace net | 1587 } // namespace net |
OLD | NEW |