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

Unified Diff: net/http/http_network_transaction_unittest.cc

Issue 995013004: Add IsAlternativeServiceBroken(), remove is_broken. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Brokenness test in Manager. Created 5 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 | « no previous file | net/http/http_server_properties.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction_unittest.cc
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index 5ab9886415beeb3009ccf0944dd8c06a8059a42b..879a44425319cd4c84295eaafc90db1556dd5df6 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -8784,11 +8784,11 @@ TEST_P(HttpNetworkTransactionTest,
base::WeakPtr<HttpServerProperties> http_server_properties =
session->http_server_properties();
+ const HostPortPair host_port_pair = HostPortPair::FromURL(request.url);
// Port must be < 1024, or the header will be ignored (since initial port was
// port 80 (another restricted port).
http_server_properties->SetAlternateProtocol(
- HostPortPair::FromURL(request.url),
- 666 /* port is ignored by MockConnect anyway */,
+ host_port_pair, 666 /* port is ignored by MockConnect anyway */,
AlternateProtocolFromNextProto(GetParam()), 1.0);
scoped_ptr<HttpTransaction> trans(
@@ -8809,10 +8809,12 @@ TEST_P(HttpNetworkTransactionTest,
EXPECT_EQ("hello world", response_data);
const AlternateProtocolInfo alternate =
- http_server_properties->GetAlternateProtocol(
- HostPortPair::FromURL(request.url));
+ http_server_properties->GetAlternateProtocol(host_port_pair);
EXPECT_NE(UNINITIALIZED_ALTERNATE_PROTOCOL, alternate.protocol);
- EXPECT_TRUE(alternate.is_broken);
+ const AlternativeService alternative_service(
+ alternate.protocol, host_port_pair.host(), alternate.port);
+ EXPECT_TRUE(
+ http_server_properties->IsAlternativeServiceBroken(alternative_service));
}
TEST_P(HttpNetworkTransactionTest,
« no previous file with comments | « no previous file | net/http/http_server_properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698