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

Unified Diff: net/quic/quic_client_promised_info_test.cc

Issue 1692253004: QUIC - chromium server push support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review feedback round 2. Created 4 years, 10 months 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/quic_chromium_client_session.cc ('k') | net/quic/quic_client_push_promise_index.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_client_promised_info_test.cc
diff --git a/net/quic/quic_client_promised_info_test.cc b/net/quic/quic_client_promised_info_test.cc
index 72510cfa9d572983eef9e7aa951c32077eaad987..3f72e7dc43e594ae03b7bc6486b2cf8e4e25a3b7 100644
--- a/net/quic/quic_client_promised_info_test.cc
+++ b/net/quic/quic_client_promised_info_test.cc
@@ -213,6 +213,21 @@ TEST_F(QuicClientPromisedInfoTest, PushPromiseInvalidUrl) {
EXPECT_EQ(session_.GetPromisedByUrl(promise_url_), nullptr);
}
+TEST_F(QuicClientPromisedInfoTest, PushPromiseInvalidUrl) {
+ // Promise with an unsafe method
+ push_promise_[":method"] = "PUT";
+ serialized_push_promise_ =
+ SpdyUtils::SerializeUncompressedHeaders(push_promise_);
+
+ EXPECT_CALL(*connection_,
+ SendRstStream(promise_id_, QUIC_INVALID_PROMISE_METHOD, 0));
+ ReceivePromise(promise_id_);
+
+ // Verify that the promise headers were ignored
+ EXPECT_EQ(session_.GetPromisedById(promise_id_), nullptr);
+ EXPECT_EQ(session_.GetPromisedByUrl(promise_url_), nullptr);
+}
+
TEST_F(QuicClientPromisedInfoTest, PushPromiseUnauthorizedUrl) {
session_.set_authorized(false);
« no previous file with comments | « net/quic/quic_chromium_client_session.cc ('k') | net/quic/quic_client_push_promise_index.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698