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/core/reliable_quic_stream.h" | 5 #include "net/quic/core/reliable_quic_stream.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "net/quic/core/quic_connection.h" | 9 #include "net/quic/core/quic_connection.h" |
10 #include "net/quic/core/quic_flags.h" | 10 #include "net/quic/core/quic_flags.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 private: | 67 private: |
68 bool should_process_data_; | 68 bool should_process_data_; |
69 string data_; | 69 string data_; |
70 }; | 70 }; |
71 | 71 |
72 class ReliableQuicStreamTest : public ::testing::TestWithParam<bool> { | 72 class ReliableQuicStreamTest : public ::testing::TestWithParam<bool> { |
73 public: | 73 public: |
74 ReliableQuicStreamTest() | 74 ReliableQuicStreamTest() |
75 : initial_flow_control_window_bytes_(kMaxPacketSize), | 75 : initial_flow_control_window_bytes_(kMaxPacketSize), |
76 zero_(QuicTime::Delta::Zero()), | 76 zero_(QuicTime::Delta::Zero()), |
77 supported_versions_(QuicSupportedVersions()) { | 77 supported_versions_(AllSupportedVersions()) { |
78 headers_[":host"] = "www.google.com"; | 78 headers_[":host"] = "www.google.com"; |
79 headers_[":path"] = "/index.hml"; | 79 headers_[":path"] = "/index.hml"; |
80 headers_[":scheme"] = "https"; | 80 headers_[":scheme"] = "https"; |
81 headers_["cookie"] = | 81 headers_["cookie"] = |
82 "__utma=208381060.1228362404.1372200928.1372200928.1372200928.1; " | 82 "__utma=208381060.1228362404.1372200928.1372200928.1372200928.1; " |
83 "__utmc=160408618; " | 83 "__utmc=160408618; " |
84 "GX=DQAAAOEAAACWJYdewdE9rIrW6qw3PtVi2-d729qaa-74KqOsM1NVQblK4VhX" | 84 "GX=DQAAAOEAAACWJYdewdE9rIrW6qw3PtVi2-d729qaa-74KqOsM1NVQblK4VhX" |
85 "hoALMsy6HOdDad2Sz0flUByv7etmo3mLMidGrBoljqO9hSVA40SLqpG_iuKKSHX" | 85 "hoALMsy6HOdDad2Sz0flUByv7etmo3mLMidGrBoljqO9hSVA40SLqpG_iuKKSHX" |
86 "RW3Np4bq0F0SDGDNsW0DSmTS9ufMRrlpARJDS7qAI6M3bghqJp4eABKZiRqebHT" | 86 "RW3Np4bq0F0SDGDNsW0DSmTS9ufMRrlpARJDS7qAI6M3bghqJp4eABKZiRqebHT" |
87 "pMU-RXvTI5D5oCF1vYxYofH_l1Kviuiy3oQ1kS1enqWgbhJ2t61_SNdv-1XJIS0" | 87 "pMU-RXvTI5D5oCF1vYxYofH_l1Kviuiy3oQ1kS1enqWgbhJ2t61_SNdv-1XJIS0" |
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 // Receive remaining data and FIN for the request. | 706 // Receive remaining data and FIN for the request. |
707 QuicStreamFrame frame2(stream_->id(), true, 0, StringPiece("End")); | 707 QuicStreamFrame frame2(stream_->id(), true, 0, StringPiece("End")); |
708 stream_->OnStreamFrame(frame2); | 708 stream_->OnStreamFrame(frame2); |
709 EXPECT_TRUE(stream_->fin_received()); | 709 EXPECT_TRUE(stream_->fin_received()); |
710 EXPECT_TRUE(stream_->HasFinalReceivedByteOffset()); | 710 EXPECT_TRUE(stream_->HasFinalReceivedByteOffset()); |
711 } | 711 } |
712 | 712 |
713 } // namespace | 713 } // namespace |
714 } // namespace test | 714 } // namespace test |
715 } // namespace net | 715 } // namespace net |
OLD | NEW |