Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Side by Side Diff: net/quic/test_tools/quic_test_utils.h

Issue 2497083002: Server push cancellation: clean up the code to make sure shared code is in sync with internal code. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_client_session_base.h ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Common utilities for Quic tests 5 // Common utilities for Quic tests
6 6
7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 7 #ifndef NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 8 #define NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 663
664 MockQuicCryptoServerStreamHelper* helper() { return &helper_; } 664 MockQuicCryptoServerStreamHelper* helper() { return &helper_; }
665 665
666 private: 666 private:
667 MockQuicSessionVisitor visitor_; 667 MockQuicSessionVisitor visitor_;
668 MockQuicCryptoServerStreamHelper helper_; 668 MockQuicCryptoServerStreamHelper helper_;
669 669
670 DISALLOW_COPY_AND_ASSIGN(TestQuicSpdyServerSession); 670 DISALLOW_COPY_AND_ASSIGN(TestQuicSpdyServerSession);
671 }; 671 };
672 672
673 class TestPushPromiseDelegate : public QuicClientPushPromiseIndex::Delegate {
674 public:
675 explicit TestPushPromiseDelegate(bool match);
676
677 bool CheckVary(const SpdyHeaderBlock& client_request,
678 const SpdyHeaderBlock& promise_request,
679 const SpdyHeaderBlock& promise_response) override;
680
681 void OnRendezvousResult(QuicSpdyStream* stream) override;
682
683 QuicSpdyStream* rendezvous_stream() { return rendezvous_stream_; }
684 bool rendezvous_fired() { return rendezvous_fired_; }
685
686 private:
687 bool match_;
688 bool rendezvous_fired_;
689 QuicSpdyStream* rendezvous_stream_;
690 };
691
673 class TestQuicSpdyClientSession : public QuicClientSessionBase { 692 class TestQuicSpdyClientSession : public QuicClientSessionBase {
674 public: 693 public:
675 TestQuicSpdyClientSession(QuicConnection* connection, 694 TestQuicSpdyClientSession(QuicConnection* connection,
676 const QuicConfig& config, 695 const QuicConfig& config,
677 const QuicServerId& server_id, 696 const QuicServerId& server_id,
678 QuicCryptoClientConfig* crypto_config); 697 QuicCryptoClientConfig* crypto_config);
679 ~TestQuicSpdyClientSession() override; 698 ~TestQuicSpdyClientSession() override;
680 699
681 bool IsAuthorized(const std::string& authority) override; 700 bool IsAuthorized(const std::string& authority) override;
682 701
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 l.OnHeader(p.first, p.second); 1074 l.OnHeader(p.first, p.second);
1056 } 1075 }
1057 l.OnHeaderBlockEnd(total_size); 1076 l.OnHeaderBlockEnd(total_size);
1058 return l; 1077 return l;
1059 } 1078 }
1060 1079
1061 } // namespace test 1080 } // namespace test
1062 } // namespace net 1081 } // namespace net
1063 1082
1064 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_ 1083 #endif // NET_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_client_session_base.h ('k') | net/quic/test_tools/quic_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698