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/tools/quic/quic_dispatcher.h" | 5 #include "net/tools/quic/quic_dispatcher.h" |
6 | 6 |
7 #include <ostream> | 7 #include <ostream> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 class TestQuicSpdyServerSession : public QuicServerSession { | 48 class TestQuicSpdyServerSession : public QuicServerSession { |
49 public: | 49 public: |
50 TestQuicSpdyServerSession(const QuicConfig& config, | 50 TestQuicSpdyServerSession(const QuicConfig& config, |
51 QuicConnection* connection, | 51 QuicConnection* connection, |
52 const QuicCryptoServerConfig* crypto_config) | 52 const QuicCryptoServerConfig* crypto_config) |
53 : QuicServerSession(config, connection, nullptr, crypto_config), | 53 : QuicServerSession(config, connection, nullptr, crypto_config), |
54 crypto_stream_(QuicServerSession::GetCryptoStream()) {} | 54 crypto_stream_(QuicServerSession::GetCryptoStream()) {} |
55 ~TestQuicSpdyServerSession() override{}; | 55 ~TestQuicSpdyServerSession() override{}; |
56 | 56 |
57 MOCK_METHOD2(OnConnectionClosed, void(QuicErrorCode error, bool from_peer)); | 57 MOCK_METHOD2(OnConnectionClosed, void(QuicErrorCode error, bool from_peer)); |
58 MOCK_METHOD1(CreateIncomingDynamicStream, QuicDataStream*(QuicStreamId id)); | 58 MOCK_METHOD1(CreateIncomingDynamicStream, QuicSpdyStream*(QuicStreamId id)); |
59 MOCK_METHOD0(CreateOutgoingDynamicStream, QuicDataStream*()); | 59 MOCK_METHOD0(CreateOutgoingDynamicStream, QuicSpdyStream*()); |
60 | 60 |
61 void SetCryptoStream(QuicCryptoServerStream* crypto_stream) { | 61 void SetCryptoStream(QuicCryptoServerStream* crypto_stream) { |
62 crypto_stream_ = crypto_stream; | 62 crypto_stream_ = crypto_stream; |
63 } | 63 } |
64 | 64 |
65 QuicCryptoServerStream* GetCryptoStream() override { return crypto_stream_; } | 65 QuicCryptoServerStream* GetCryptoStream() override { return crypto_stream_; } |
66 | 66 |
67 private: | 67 private: |
68 QuicCryptoServerStream* crypto_stream_; | 68 QuicCryptoServerStream* crypto_stream_; |
69 | 69 |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 // And we'll resume where we left off when we get another call. | 750 // And we'll resume where we left off when we get another call. |
751 EXPECT_CALL(*connection2(), OnCanWrite()); | 751 EXPECT_CALL(*connection2(), OnCanWrite()); |
752 dispatcher_.OnCanWrite(); | 752 dispatcher_.OnCanWrite(); |
753 EXPECT_FALSE(dispatcher_.HasPendingWrites()); | 753 EXPECT_FALSE(dispatcher_.HasPendingWrites()); |
754 } | 754 } |
755 | 755 |
756 } // namespace | 756 } // namespace |
757 } // namespace test | 757 } // namespace test |
758 } // namespace tools | 758 } // namespace tools |
759 } // namespace net | 759 } // namespace net |
OLD | NEW |