| 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_session.h" | 5 #include "net/quic/quic_session.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 177 |
| 178 private: | 178 private: |
| 179 StrictMock<TestCryptoStream> crypto_stream_; | 179 StrictMock<TestCryptoStream> crypto_stream_; |
| 180 | 180 |
| 181 bool writev_consumes_all_data_; | 181 bool writev_consumes_all_data_; |
| 182 }; | 182 }; |
| 183 | 183 |
| 184 class QuicSessionTest : public ::testing::TestWithParam<QuicVersion> { | 184 class QuicSessionTest : public ::testing::TestWithParam<QuicVersion> { |
| 185 protected: | 185 protected: |
| 186 QuicSessionTest() | 186 QuicSessionTest() |
| 187 : connection_(new MockConnection(true, SupportedVersions(GetParam()))), | 187 : connection_(new MockConnection(Perspective::IS_SERVER, |
| 188 SupportedVersions(GetParam()))), |
| 188 session_(connection_) { | 189 session_(connection_) { |
| 189 session_.config()->SetInitialStreamFlowControlWindowToSend( | 190 session_.config()->SetInitialStreamFlowControlWindowToSend( |
| 190 kInitialStreamFlowControlWindowForTest); | 191 kInitialStreamFlowControlWindowForTest); |
| 191 session_.config()->SetInitialSessionFlowControlWindowToSend( | 192 session_.config()->SetInitialSessionFlowControlWindowToSend( |
| 192 kInitialSessionFlowControlWindowForTest); | 193 kInitialSessionFlowControlWindowForTest); |
| 193 headers_[":host"] = "www.google.com"; | 194 headers_[":host"] = "www.google.com"; |
| 194 headers_[":path"] = "/index.hml"; | 195 headers_[":path"] = "/index.hml"; |
| 195 headers_[":scheme"] = "http"; | 196 headers_[":scheme"] = "http"; |
| 196 headers_["cookie"] = | 197 headers_["cookie"] = |
| 197 "__utma=208381060.1228362404.1372200928.1372200928.1372200928.1; " | 198 "__utma=208381060.1228362404.1372200928.1372200928.1372200928.1; " |
| (...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 } | 968 } |
| 968 | 969 |
| 969 // Called after any new data is received by the session, and triggers the call | 970 // Called after any new data is received by the session, and triggers the call |
| 970 // to close the connection. | 971 // to close the connection. |
| 971 session_.PostProcessAfterData(); | 972 session_.PostProcessAfterData(); |
| 972 } | 973 } |
| 973 | 974 |
| 974 } // namespace | 975 } // namespace |
| 975 } // namespace test | 976 } // namespace test |
| 976 } // namespace net | 977 } // namespace net |
| OLD | NEW |