| 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/quic_session.h" | 5 #include "net/quic/core/quic_session.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "net/quic/test_tools/quic_test_utils.h" | 29 #include "net/quic/test_tools/quic_test_utils.h" |
| 30 #include "net/quic/test_tools/reliable_quic_stream_peer.h" | 30 #include "net/quic/test_tools/reliable_quic_stream_peer.h" |
| 31 #include "net/spdy/spdy_framer.h" | 31 #include "net/spdy/spdy_framer.h" |
| 32 #include "net/test/gtest_util.h" | 32 #include "net/test/gtest_util.h" |
| 33 #include "testing/gmock/include/gmock/gmock.h" | 33 #include "testing/gmock/include/gmock/gmock.h" |
| 34 #include "testing/gmock_mutant.h" | 34 #include "testing/gmock_mutant.h" |
| 35 #include "testing/gtest/include/gtest/gtest.h" | 35 #include "testing/gtest/include/gtest/gtest.h" |
| 36 | 36 |
| 37 using net::SpdyHeaderBlock; | 37 using net::SpdyHeaderBlock; |
| 38 using net::SpdyPriority; | 38 using net::SpdyPriority; |
| 39 using std::set; | |
| 40 using std::string; | 39 using std::string; |
| 41 using std::vector; | |
| 42 using testing::CreateFunctor; | 40 using testing::CreateFunctor; |
| 43 using testing::AtLeast; | 41 using testing::AtLeast; |
| 44 using testing::InSequence; | 42 using testing::InSequence; |
| 45 using testing::Invoke; | 43 using testing::Invoke; |
| 46 using testing::Return; | 44 using testing::Return; |
| 47 using testing::StrictMock; | 45 using testing::StrictMock; |
| 48 using testing::_; | 46 using testing::_; |
| 49 | 47 |
| 50 namespace net { | 48 namespace net { |
| 51 namespace test { | 49 namespace test { |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 closed_streams_.insert(id); | 273 closed_streams_.insert(id); |
| 276 } | 274 } |
| 277 | 275 |
| 278 QuicVersion version() const { return connection_->version(); } | 276 QuicVersion version() const { return connection_->version(); } |
| 279 | 277 |
| 280 QuicFlagSaver flags_; // Save/restore all QUIC flag values. | 278 QuicFlagSaver flags_; // Save/restore all QUIC flag values. |
| 281 MockQuicConnectionHelper helper_; | 279 MockQuicConnectionHelper helper_; |
| 282 MockAlarmFactory alarm_factory_; | 280 MockAlarmFactory alarm_factory_; |
| 283 StrictMock<MockQuicConnection>* connection_; | 281 StrictMock<MockQuicConnection>* connection_; |
| 284 TestSession session_; | 282 TestSession session_; |
| 285 set<QuicStreamId> closed_streams_; | 283 std::set<QuicStreamId> closed_streams_; |
| 286 SpdyHeaderBlock headers_; | 284 SpdyHeaderBlock headers_; |
| 287 }; | 285 }; |
| 288 | 286 |
| 289 class QuicSessionTestServer : public QuicSessionTestBase { | 287 class QuicSessionTestServer : public QuicSessionTestBase { |
| 290 protected: | 288 protected: |
| 291 QuicSessionTestServer() : QuicSessionTestBase(Perspective::IS_SERVER) {} | 289 QuicSessionTestServer() : QuicSessionTestBase(Perspective::IS_SERVER) {} |
| 292 }; | 290 }; |
| 293 | 291 |
| 294 INSTANTIATE_TEST_CASE_P(Tests, | 292 INSTANTIATE_TEST_CASE_P(Tests, |
| 295 QuicSessionTestServer, | 293 QuicSessionTestServer, |
| (...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1297 if (version() <= QUIC_VERSION_35) { | 1295 if (version() <= QUIC_VERSION_35) { |
| 1298 EXPECT_FALSE(session_.force_hol_blocking()); | 1296 EXPECT_FALSE(session_.force_hol_blocking()); |
| 1299 } else { | 1297 } else { |
| 1300 EXPECT_TRUE(session_.force_hol_blocking()); | 1298 EXPECT_TRUE(session_.force_hol_blocking()); |
| 1301 } | 1299 } |
| 1302 } | 1300 } |
| 1303 | 1301 |
| 1304 } // namespace | 1302 } // namespace |
| 1305 } // namespace test | 1303 } // namespace test |
| 1306 } // namespace net | 1304 } // namespace net |
| OLD | NEW |