Commit cec1cee8 authored by Ryan Hamilton's avatar Ryan Hamilton Committed by Commit Bot

Clean up ResetPooledAfterHandshakeConfirmedThenBroken

in QuicNetworkTransactionTest to add expectations
of which service is broken and to remove some hardcoded hostnames.

Change-Id: I639dff987f913d4f4fbe28d18899d844e10a97f9
Reviewed-on: https://chromium-review.googlesource.com/825643
Commit-Queue: Ryan Hamilton <rch@chromium.org>
Reviewed-by: default avatarBuck Krasic <ckrasic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524236}
parent 04c34dcc
...@@ -3178,16 +3178,15 @@ TEST_P(QuicNetworkTransactionTest, ...@@ -3178,16 +3178,15 @@ TEST_P(QuicNetworkTransactionTest,
// Set up alternative service for |origin1|. // Set up alternative service for |origin1|.
base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1); base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1);
AlternativeService alternative1(kProtoQUIC, origin1.host(), 443);
http_server_properties_.SetQuicAlternativeService( http_server_properties_.SetQuicAlternativeService(
url::SchemeHostPort(origin1), url::SchemeHostPort(origin1), alternative1, expiration,
AlternativeService(kProtoQUIC, "mail.example.com", 443), expiration,
supported_versions_); supported_versions_);
// Set up alternative service for |origin2|. // Set up alternative service for |origin2|.
AlternativeServiceInfoVector alternative_services; AlternativeService alternative2(kProtoQUIC, origin2.host(), 443);
http_server_properties_.SetQuicAlternativeService( http_server_properties_.SetQuicAlternativeService(
url::SchemeHostPort(origin2), url::SchemeHostPort(origin2), alternative2, expiration,
AlternativeService(kProtoQUIC, "www.example.com", 443), expiration,
supported_versions_); supported_versions_);
// First request opens connection to |destination1| // First request opens connection to |destination1|
...@@ -3199,6 +3198,10 @@ TEST_P(QuicNetworkTransactionTest, ...@@ -3199,6 +3198,10 @@ TEST_P(QuicNetworkTransactionTest,
// After it is reset, it will fail back to QUIC and mark QUIC as broken. // After it is reset, it will fail back to QUIC and mark QUIC as broken.
request_.url = origin2; request_.url = origin2;
SendRequestAndExpectHttpResponse("hello world"); SendRequestAndExpectHttpResponse("hello world");
EXPECT_TRUE(http_server_properties_.IsAlternativeServiceBroken(alternative1))
<< alternative1.ToString();
EXPECT_FALSE(http_server_properties_.IsAlternativeServiceBroken(alternative2))
<< alternative2.ToString();
// The third request should use a new QUIC connection, not the broken // The third request should use a new QUIC connection, not the broken
// QUIC connection. // QUIC connection.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment