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

Unified Diff: net/quic/chromium/quic_http_stream_test.cc

Issue 2908243002: Remove QuicChromiumClientStream::Delegate in favor of async methods. (Closed)
Patch Set: Async errors Created 3 years, 7 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
Index: net/quic/chromium/quic_http_stream_test.cc
diff --git a/net/quic/chromium/quic_http_stream_test.cc b/net/quic/chromium/quic_http_stream_test.cc
index 2432a5c1c785c0369aeb26b7391a38279b75591a..5f7a7b1c22c11ce48e264be0858c1114af3a6d53 100644
--- a/net/quic/chromium/quic_http_stream_test.cc
+++ b/net/quic/chromium/quic_http_stream_test.cc
@@ -1403,7 +1403,7 @@ TEST_P(QuicHttpStreamTest, DestroyedEarly) {
SetResponse("404 OK", "hello world!");
// In the course of processing this packet, the QuicHttpStream close itself.
size_t response_size = 0;
- ProcessPacket(ConstructResponseHeadersPacket(2, kFin, &response_size));
+ ProcessPacket(ConstructResponseHeadersPacket(2, !kFin, &response_size));
xunjieli 2017/05/31 00:25:22 Why is kFin changed to !kFin?
Ryan Hamilton 2017/05/31 02:49:56 Ah! Good question :) So with the new code, if kFin
xunjieli 2017/06/01 15:30:32 Acknowledged.
base::RunLoop().RunUntilIdle();
@@ -1469,38 +1469,6 @@ TEST_P(QuicHttpStreamTest, Priority) {
stream_->GetTotalReceivedBytes());
}
-// Regression test for http://crbug.com/294870
-TEST_P(QuicHttpStreamTest, CheckPriorityWithNoDelegate) {
xunjieli 2017/05/31 00:25:22 Why is this test deleted?
Ryan Hamilton 2017/05/31 02:49:56 Ah, because this test is all about what happens wh
xunjieli 2017/06/01 15:30:32 Acknowledged.
- SetRequest("GET", "/", MEDIUM);
- QuicStreamOffset header_stream_offset = 0;
- AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
- AddWrite(ConstructClientRstStreamPacket(2));
-
- Initialize();
-
- request_.method = "GET";
- request_.url = GURL("https://www.example.org/");
-
- EXPECT_EQ(OK, stream_->InitializeStream(&request_, MEDIUM, net_log_.bound(),
- callback_.callback()));
-
- // Check that priority is highest.
- QuicChromiumClientStream::Handle* reliable_stream =
- QuicHttpStreamPeer::GetQuicChromiumClientStream(stream_.get());
- DCHECK(reliable_stream);
- QuicChromiumClientStream::Delegate* delegate = reliable_stream->GetDelegate();
- DCHECK(delegate);
- DCHECK_EQ(kV3HighestPriority, reliable_stream->priority());
-
- // Set Delegate to nullptr and make sure Priority returns highest
- // priority.
- reliable_stream->ClearDelegate();
- DCHECK_EQ(kV3HighestPriority, reliable_stream->priority());
-
- EXPECT_EQ(0, stream_->GetTotalSentBytes());
- EXPECT_EQ(0, stream_->GetTotalReceivedBytes());
-}
-
TEST_P(QuicHttpStreamTest, SessionClosedDuringDoLoop) {
SetRequest("POST", "/", DEFAULT_PRIORITY);
size_t spdy_request_headers_frame_length;

Powered by Google App Engine
This is Rietveld 408576698