OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <memory> | 5 #include <memory> |
6 #include <ostream> | 6 #include <ostream> |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 #include "net/quic/chromium/quic_test_packet_maker.h" | 47 #include "net/quic/chromium/quic_test_packet_maker.h" |
48 #include "net/quic/chromium/test_task_runner.h" | 48 #include "net/quic/chromium/test_task_runner.h" |
49 #include "net/quic/core/crypto/quic_decrypter.h" | 49 #include "net/quic/core/crypto/quic_decrypter.h" |
50 #include "net/quic/core/crypto/quic_encrypter.h" | 50 #include "net/quic/core/crypto/quic_encrypter.h" |
51 #include "net/quic/core/quic_framer.h" | 51 #include "net/quic/core/quic_framer.h" |
52 #include "net/quic/platform/api/quic_string_piece.h" | 52 #include "net/quic/platform/api/quic_string_piece.h" |
53 #include "net/quic/platform/impl/quic_test_impl.h" | 53 #include "net/quic/platform/impl/quic_test_impl.h" |
54 #include "net/quic/test_tools/crypto_test_utils.h" | 54 #include "net/quic/test_tools/crypto_test_utils.h" |
55 #include "net/quic/test_tools/mock_clock.h" | 55 #include "net/quic/test_tools/mock_clock.h" |
56 #include "net/quic/test_tools/mock_random.h" | 56 #include "net/quic/test_tools/mock_random.h" |
57 #include "net/quic/test_tools/quic_spdy_session_peer.h" | |
57 #include "net/quic/test_tools/quic_test_utils.h" | 58 #include "net/quic/test_tools/quic_test_utils.h" |
58 #include "net/socket/client_socket_factory.h" | 59 #include "net/socket/client_socket_factory.h" |
59 #include "net/socket/mock_client_socket_pool_manager.h" | 60 #include "net/socket/mock_client_socket_pool_manager.h" |
60 #include "net/socket/next_proto.h" | 61 #include "net/socket/next_proto.h" |
61 #include "net/socket/socket_performance_watcher.h" | 62 #include "net/socket/socket_performance_watcher.h" |
62 #include "net/socket/socket_performance_watcher_factory.h" | 63 #include "net/socket/socket_performance_watcher_factory.h" |
63 #include "net/socket/socket_test_util.h" | 64 #include "net/socket/socket_test_util.h" |
64 #include "net/spdy/core/spdy_frame_builder.h" | 65 #include "net/spdy/core/spdy_frame_builder.h" |
65 #include "net/spdy/core/spdy_framer.h" | 66 #include "net/spdy/core/spdy_framer.h" |
66 #include "net/ssl/ssl_config_service_defaults.h" | 67 #include "net/ssl/ssl_config_service_defaults.h" |
67 #include "net/test/cert_test_util.h" | 68 #include "net/test/cert_test_util.h" |
68 #include "net/test/gtest_util.h" | 69 #include "net/test/gtest_util.h" |
69 #include "net/test/test_data_directory.h" | 70 #include "net/test/test_data_directory.h" |
70 #include "net/traffic_annotation/network_traffic_annotation_test_helper.h" | 71 #include "net/traffic_annotation/network_traffic_annotation_test_helper.h" |
71 #include "net/url_request/url_request.h" | 72 #include "net/url_request/url_request.h" |
72 #include "net/url_request/url_request_job_factory_impl.h" | 73 #include "net/url_request/url_request_job_factory_impl.h" |
73 #include "net/url_request/url_request_test_util.h" | 74 #include "net/url_request/url_request_test_util.h" |
74 #include "testing/gmock/include/gmock/gmock.h" | 75 #include "testing/gmock/include/gmock/gmock.h" |
75 #include "testing/gtest/include/gtest/gtest.h" | 76 #include "testing/gtest/include/gtest/gtest.h" |
76 #include "testing/platform_test.h" | 77 #include "testing/platform_test.h" |
77 #include "url/gurl.h" | 78 #include "url/gurl.h" |
78 | 79 |
79 namespace net { | 80 namespace net { |
80 namespace test { | 81 namespace test { |
81 | 82 |
82 namespace { | 83 namespace { |
83 | 84 |
85 const QuicStreamId kClientDataStreamId1 = 5; | |
86 const QuicStreamId kClientDataStreamId2 = 7; | |
87 const QuicStreamId kServerDataStreamId1 = 2; | |
Ryan Hamilton
2017/05/03 19:15:34
Should these be converted to use the new methods s
Buck
2017/05/03 21:48:16
Done.
| |
88 | |
84 enum DestinationType { | 89 enum DestinationType { |
85 // In pooling tests with two requests for different origins to the same | 90 // In pooling tests with two requests for different origins to the same |
86 // destination, the destination should be | 91 // destination, the destination should be |
87 SAME_AS_FIRST, // the same as the first origin, | 92 SAME_AS_FIRST, // the same as the first origin, |
88 SAME_AS_SECOND, // the same as the second origin, or | 93 SAME_AS_SECOND, // the same as the second origin, or |
89 DIFFERENT, // different from both. | 94 DIFFERENT, // different from both. |
90 }; | 95 }; |
91 | 96 |
92 static const char kQuicAlternativeServiceHeader[] = | 97 static const char kQuicAlternativeServiceHeader[] = |
93 "Alt-Svc: quic=\":443\"\r\n\r\n"; | 98 "Alt-Svc: quic=\":443\"\r\n\r\n"; |
(...skipping 4530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4624 | 4629 |
4625 request_.url = GURL("https://mail.example.org/pushed.jpg"); | 4630 request_.url = GURL("https://mail.example.org/pushed.jpg"); |
4626 ChunkedUploadDataStream upload_data(0); | 4631 ChunkedUploadDataStream upload_data(0); |
4627 upload_data.AppendData("1", 1, true); | 4632 upload_data.AppendData("1", 1, true); |
4628 request_.upload_data_stream = &upload_data; | 4633 request_.upload_data_stream = &upload_data; |
4629 SendRequestAndExpectQuicResponse("and hello!"); | 4634 SendRequestAndExpectQuicResponse("and hello!"); |
4630 } | 4635 } |
4631 | 4636 |
4632 } // namespace test | 4637 } // namespace test |
4633 } // namespace net | 4638 } // namespace net |
OLD | NEW |