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

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

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 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 abb93e0839690d636c13253ca0c8e56693fc0c15..3eee2670d3c48de1f4db21491202e27f6d037475 100644
--- a/net/quic/core/quic_client_promised_info_test.cc
+++ b/net/quic/core/quic_client_promised_info_test.cc
@@ -12,7 +12,6 @@
#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;
@@ -190,7 +189,7 @@ TEST_F(QuicClientPromisedInfoTest, PushPromiseMismatch) {
promise_stream->OnStreamHeaderList(false, headers.uncompressed_header_bytes(),
headers);
- PushPromiseDelegate delegate(/*match=*/false);
+ TestPushPromiseDelegate delegate(/*match=*/false);
EXPECT_CALL(*connection_,
SendRstStream(promise_id_, QUIC_PROMISE_VARY_MISMATCH, 0));
EXPECT_CALL(session_, CloseStream(promise_id_));
@@ -202,11 +201,13 @@ TEST_F(QuicClientPromisedInfoTest, PushPromiseVaryWaits) {
ReceivePromise(promise_id_);
QuicClientPromisedInfo* promised = session_.GetPromisedById(promise_id_);
+ EXPECT_FALSE(promised->is_validating());
ASSERT_NE(promised, nullptr);
// Now initiate rendezvous.
- PushPromiseDelegate delegate(/*match=*/true);
+ TestPushPromiseDelegate delegate(/*match=*/true);
promised->HandleClientRequest(client_request_, &delegate);
+ EXPECT_TRUE(promised->is_validating());
// Promise is still there, waiting for response.
EXPECT_NE(session_.GetPromisedById(promise_id_), nullptr);
@@ -239,7 +240,7 @@ TEST_F(QuicClientPromisedInfoTest, PushPromiseVaryNoWait) {
headers);
// Now initiate rendezvous.
- PushPromiseDelegate delegate(/*match=*/true);
+ TestPushPromiseDelegate delegate(/*match=*/true);
promised->HandleClientRequest(client_request_, &delegate);
// Promise is gone
@@ -257,7 +258,7 @@ TEST_F(QuicClientPromisedInfoTest, PushPromiseWaitCancels) {
ASSERT_NE(promised, nullptr);
// Now initiate rendezvous.
- PushPromiseDelegate delegate(/*match=*/true);
+ TestPushPromiseDelegate delegate(/*match=*/true);
promised->HandleClientRequest(client_request_, &delegate);
// Promise is still there, waiting for response.
@@ -297,7 +298,7 @@ TEST_F(QuicClientPromisedInfoTest, PushPromiseDataClosed) {
session_.SendRstStream(promise_id_, QUIC_STREAM_PEER_GOING_AWAY, 0);
// Now initiate rendezvous.
- PushPromiseDelegate delegate(/*match=*/true);
+ TestPushPromiseDelegate delegate(/*match=*/true);
EXPECT_EQ(promised->HandleClientRequest(client_request_, &delegate),
QUIC_FAILURE);
« 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