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

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

Issue 2778943002: Pass HttpServerProperties in to QuicHttpStream so that it can mark QUIC broken. (Closed)
Patch Set: Rebase Created 3 years, 9 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/chromium/quic_http_stream.cc ('k') | net/quic/chromium/quic_stream_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 db0bb2ca10693a90f5c7bf8ecea6fe8b49368ee0..da5f35b3a9e6bb906c3b392148403c3b7da63434 100644
--- a/net/quic/chromium/quic_http_stream_test.cc
+++ b/net/quic/chromium/quic_http_stream_test.cc
@@ -22,6 +22,7 @@
#include "net/base/test_completion_callback.h"
#include "net/base/upload_bytes_element_reader.h"
#include "net/http/http_response_headers.h"
+#include "net/http/http_server_properties_impl.h"
#include "net/http/transport_security_state.h"
#include "net/log/net_log_event_type.h"
#include "net/log/test_net_log.h"
@@ -101,8 +102,9 @@ class TestQuicConnection : public QuicConnection {
class AutoClosingStream : public QuicHttpStream {
public:
explicit AutoClosingStream(
- const base::WeakPtr<QuicChromiumClientSession>& session)
- : QuicHttpStream(session) {}
+ const base::WeakPtr<QuicChromiumClientSession>& session,
+ HttpServerProperties* http_server_properties)
+ : QuicHttpStream(session, http_server_properties) {}
void OnHeadersAvailable(const SpdyHeaderBlock& headers,
size_t frame_len) override {
@@ -330,12 +332,16 @@ class QuicHttpStreamTest : public ::testing::TestWithParam<QuicVersion> {
session_->CryptoConnect(callback.callback());
EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed());
stream_.reset(use_closing_stream_
- ? new AutoClosingStream(session_->GetWeakPtr())
- : new QuicHttpStream(session_->GetWeakPtr()));
+ ? new AutoClosingStream(session_->GetWeakPtr(),
+ &http_server_properties_)
+ : new QuicHttpStream(session_->GetWeakPtr(),
+ &http_server_properties_));
promised_stream_.reset(use_closing_stream_
- ? new AutoClosingStream(session_->GetWeakPtr())
- : new QuicHttpStream(session_->GetWeakPtr()));
+ ? new AutoClosingStream(session_->GetWeakPtr(),
+ &http_server_properties_)
+ : new QuicHttpStream(session_->GetWeakPtr(),
+ &http_server_properties_));
push_promise_[":path"] = "/bar";
push_promise_[":authority"] = "www.example.org";
@@ -559,6 +565,7 @@ class QuicHttpStreamTest : public ::testing::TestWithParam<QuicVersion> {
scoped_refptr<TestTaskRunner> runner_;
std::unique_ptr<MockWrite[]> mock_writes_;
MockClock clock_;
+ HttpServerPropertiesImpl http_server_properties_;
TestQuicConnection* connection_;
std::unique_ptr<QuicChromiumConnectionHelper> helper_;
std::unique_ptr<QuicChromiumAlarmFactory> alarm_factory_;
@@ -718,7 +725,7 @@ TEST_P(QuicHttpStreamTest, LoadTimingTwoRequests) {
stream_->SendRequest(headers_, &response_, callback_.callback()));
// Start a second request.
- QuicHttpStream stream2(session_->GetWeakPtr());
+ QuicHttpStream stream2(session_->GetWeakPtr(), &http_server_properties_);
TestCompletionCallback callback2;
EXPECT_EQ(OK,
stream2.InitializeStream(&request_, DEFAULT_PRIORITY,
« no previous file with comments | « net/quic/chromium/quic_http_stream.cc ('k') | net/quic/chromium/quic_stream_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698