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

Unified Diff: net/quic/core/quic_client_promised_info_test.cc

Issue 2458793002: Server push cancellation: add PushPromiseHelper which reflects information on the push promise. (Closed)
Patch Set: sync and fix tests 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_client_promised_info.cc ('k') | net/quic/core/quic_client_session_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_client_promised_info_test.cc
diff --git a/net/quic/core/quic_client_promised_info_test.cc b/net/quic/core/quic_client_promised_info_test.cc
index 8cddbe6702365e0fbd4c3f3c88c9e8fb4224945e..abb93e0839690d636c13253ca0c8e56693fc0c15 100644
--- a/net/quic/core/quic_client_promised_info_test.cc
+++ b/net/quic/core/quic_client_promised_info_test.cc
@@ -12,6 +12,7 @@
#include "net/quic/test_tools/quic_client_promised_info_peer.h"
#include "net/test/gtest_util.h"
#include "net/tools/quic/quic_client_session.h"
+#include "net/tools/quic/test_tools/push_promise_delegate.h"
using std::string;
using testing::StrictMock;
@@ -85,34 +86,6 @@ class QuicClientPromisedInfoTest : public ::testing::Test {
}
};
- class PushPromiseDelegate : public QuicClientPushPromiseIndex::Delegate {
- public:
- explicit PushPromiseDelegate(bool match)
- : match_(match),
- rendezvous_fired_(false),
- rendezvous_stream_(nullptr) {}
-
- bool CheckVary(const SpdyHeaderBlock& client_request,
- const SpdyHeaderBlock& promise_request,
- const SpdyHeaderBlock& promise_response) override {
- DVLOG(1) << "match " << match_;
- return match_;
- }
-
- void OnRendezvousResult(QuicSpdyStream* stream) override {
- rendezvous_fired_ = true;
- rendezvous_stream_ = stream;
- }
-
- QuicSpdyStream* rendezvous_stream() { return rendezvous_stream_; }
- bool rendezvous_fired() { return rendezvous_fired_; }
-
- private:
- bool match_;
- bool rendezvous_fired_;
- QuicSpdyStream* rendezvous_stream_;
- };
-
void ReceivePromise(QuicStreamId id) {
auto headers = AsHeaderList(push_promise_);
stream_->OnPromiseHeaderList(id, headers.uncompressed_header_bytes(),
« no previous file with comments | « net/quic/core/quic_client_promised_info.cc ('k') | net/quic/core/quic_client_session_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698