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 "net/quic/quic_http_stream.h" | 5 #include "net/quic/quic_http_stream.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "base/strings/string_number_conversions.h" | 13 #include "base/strings/string_number_conversions.h" |
14 #include "base/threading/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
15 #include "net/base/chunked_upload_data_stream.h" | 15 #include "net/base/chunked_upload_data_stream.h" |
16 #include "net/base/elements_upload_data_stream.h" | 16 #include "net/base/elements_upload_data_stream.h" |
17 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
18 #include "net/base/test_completion_callback.h" | 18 #include "net/base/test_completion_callback.h" |
19 #include "net/base/test_data_directory.h" | |
20 #include "net/base/upload_bytes_element_reader.h" | 19 #include "net/base/upload_bytes_element_reader.h" |
21 #include "net/http/http_response_headers.h" | 20 #include "net/http/http_response_headers.h" |
22 #include "net/http/transport_security_state.h" | 21 #include "net/http/transport_security_state.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/quic/congestion_control/send_algorithm_interface.h" | 24 #include "net/quic/congestion_control/send_algorithm_interface.h" |
26 #include "net/quic/crypto/crypto_protocol.h" | 25 #include "net/quic/crypto/crypto_protocol.h" |
27 #include "net/quic/crypto/proof_verifier_chromium.h" | 26 #include "net/quic/crypto/proof_verifier_chromium.h" |
28 #include "net/quic/crypto/quic_decrypter.h" | 27 #include "net/quic/crypto/quic_decrypter.h" |
29 #include "net/quic/crypto/quic_encrypter.h" | 28 #include "net/quic/crypto/quic_encrypter.h" |
(...skipping 14 matching lines...) Expand all Loading... |
44 #include "net/quic/test_tools/quic_test_packet_maker.h" | 43 #include "net/quic/test_tools/quic_test_packet_maker.h" |
45 #include "net/quic/test_tools/quic_test_utils.h" | 44 #include "net/quic/test_tools/quic_test_utils.h" |
46 #include "net/quic/test_tools/test_task_runner.h" | 45 #include "net/quic/test_tools/test_task_runner.h" |
47 #include "net/socket/socket_performance_watcher.h" | 46 #include "net/socket/socket_performance_watcher.h" |
48 #include "net/socket/socket_test_util.h" | 47 #include "net/socket/socket_test_util.h" |
49 #include "net/spdy/spdy_frame_builder.h" | 48 #include "net/spdy/spdy_frame_builder.h" |
50 #include "net/spdy/spdy_framer.h" | 49 #include "net/spdy/spdy_framer.h" |
51 #include "net/spdy/spdy_http_utils.h" | 50 #include "net/spdy/spdy_http_utils.h" |
52 #include "net/spdy/spdy_protocol.h" | 51 #include "net/spdy/spdy_protocol.h" |
53 #include "net/test/cert_test_util.h" | 52 #include "net/test/cert_test_util.h" |
| 53 #include "net/test/test_data_directory.h" |
54 #include "testing/gmock/include/gmock/gmock.h" | 54 #include "testing/gmock/include/gmock/gmock.h" |
55 #include "testing/gtest/include/gtest/gtest.h" | 55 #include "testing/gtest/include/gtest/gtest.h" |
56 | 56 |
57 using std::string; | 57 using std::string; |
58 using testing::_; | 58 using testing::_; |
59 using testing::AnyNumber; | 59 using testing::AnyNumber; |
60 using testing::Return; | 60 using testing::Return; |
61 | 61 |
62 namespace net { | 62 namespace net { |
63 namespace test { | 63 namespace test { |
(...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1716 // QuicHttpStream::GetTotalSent/ReceivedBytes currently only includes the | 1716 // QuicHttpStream::GetTotalSent/ReceivedBytes currently only includes the |
1717 // headers and payload. | 1717 // headers and payload. |
1718 EXPECT_EQ(static_cast<int64_t>(spdy_request_header_frame_length), | 1718 EXPECT_EQ(static_cast<int64_t>(spdy_request_header_frame_length), |
1719 promised_stream_->GetTotalSentBytes()); | 1719 promised_stream_->GetTotalSentBytes()); |
1720 EXPECT_EQ(static_cast<int64_t>(spdy_response_header_frame_length), | 1720 EXPECT_EQ(static_cast<int64_t>(spdy_response_header_frame_length), |
1721 promised_stream_->GetTotalReceivedBytes()); | 1721 promised_stream_->GetTotalReceivedBytes()); |
1722 } | 1722 } |
1723 | 1723 |
1724 } // namespace test | 1724 } // namespace test |
1725 } // namespace net | 1725 } // namespace net |
OLD | NEW |