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

Unified Diff: net/quic/quic_network_transaction_unittest.cc

Issue 2041863002: Remove HttpServerProperies::GetWeakPtr(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 6 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_end_to_end_unittest.cc ('k') | net/quic/quic_stream_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_network_transaction_unittest.cc
diff --git a/net/quic/quic_network_transaction_unittest.cc b/net/quic/quic_network_transaction_unittest.cc
index 1d0128c317873326863b20819131180578979bc0..7be9d646915cd2cb9320b185ddac4e48328f17f3 100644
--- a/net/quic/quic_network_transaction_unittest.cc
+++ b/net/quic/quic_network_transaction_unittest.cc
@@ -288,6 +288,7 @@ class QuicNetworkTransactionTest
PlatformTest::TearDown();
NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests();
base::RunLoop().RunUntilIdle();
+ session_.reset();
}
std::unique_ptr<QuicEncryptedPacket> ConstructClientConnectionClosePacket(
@@ -515,7 +516,7 @@ class QuicNetworkTransactionTest
params_.proxy_service = proxy_service_.get();
params_.ssl_config_service = ssl_config_service_.get();
params_.http_auth_handler_factory = auth_handler_factory_.get();
- params_.http_server_properties = http_server_properties_.GetWeakPtr();
+ params_.http_server_properties = &http_server_properties_;
params_.quic_supported_versions = SupportedVersions(GetParam());
for (const char* host :
{kDefaultServerHostName, "www.example.org", "news.example.org",
@@ -1017,7 +1018,7 @@ TEST_P(QuicNetworkTransactionTest, SetAlternativeServiceWithScheme) {
// header advertises alternative service for mail.example.org.
request_.url = GURL("http://mail.example.org:443");
SendRequestAndExpectHttpResponse("hello world");
- base::WeakPtr<HttpServerProperties> http_server_properties =
+ HttpServerProperties* http_server_properties =
session_->http_server_properties();
url::SchemeHostPort http_server("http", "mail.example.org", 443);
url::SchemeHostPort https_server("https", "mail.example.org", 443);
@@ -1049,7 +1050,7 @@ TEST_P(QuicNetworkTransactionTest, DoNotGetAltSvcForDifferentOrigin) {
// Send https request and set alternative services if response header
// advertises alternative service for mail.example.org.
SendRequestAndExpectHttpResponse("hello world");
- base::WeakPtr<HttpServerProperties> http_server_properties =
+ HttpServerProperties* http_server_properties =
session_->http_server_properties();
const url::SchemeHostPort https_server(request_.url);
@@ -2190,7 +2191,7 @@ class QuicNetworkTransactionWithDestinationTest
params.ssl_config_service = ssl_config_service_.get();
params.proxy_service = proxy_service_.get();
params.http_auth_handler_factory = auth_handler_factory_.get();
- params.http_server_properties = http_server_properties_.GetWeakPtr();
+ params.http_server_properties = &http_server_properties_;
params.quic_supported_versions = SupportedVersions(version_);
params.quic_host_whitelist.insert("news.example.org");
params.quic_host_whitelist.insert("mail.example.org");
@@ -2209,6 +2210,7 @@ class QuicNetworkTransactionWithDestinationTest
PlatformTest::TearDown();
NetworkChangeNotifier::NotifyObserversOfIPAddressChangeForTests();
base::RunLoop().RunUntilIdle();
+ session_.reset();
}
void SetAlternativeService(const std::string& origin) {
« no previous file with comments | « net/quic/quic_end_to_end_unittest.cc ('k') | net/quic/quic_stream_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698