| Index: net/spdy/spdy_session_unittest.cc
|
| diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
|
| index 91547b4671dfa30f2aee07fe81d0eaf95b3d781b..232efc89a30b93442c1dcd19f2b576b9e7878ba8 100644
|
| --- a/net/spdy/spdy_session_unittest.cc
|
| +++ b/net/spdy/spdy_session_unittest.cc
|
| @@ -136,6 +136,7 @@ class SpdySessionTest : public PlatformTest,
|
| spdy_session_pool_(nullptr),
|
| test_url_(kDefaultURL),
|
| test_host_port_pair_(HostPortPair::FromURL(test_url_)),
|
| + test_scheme_origin_(test_url_),
|
| key_(test_host_port_pair_,
|
| ProxyServer::Direct(),
|
| PRIVACY_MODE_DISABLED) {
|
| @@ -211,6 +212,7 @@ class SpdySessionTest : public PlatformTest,
|
| SpdySessionPool* spdy_session_pool_;
|
| GURL test_url_;
|
| HostPortPair test_host_port_pair_;
|
| + url::SchemeHostPort test_scheme_origin_;
|
| SpdySessionKey key_;
|
| BoundTestNetLog log_;
|
| };
|
| @@ -1527,14 +1529,12 @@ TEST_P(SpdySessionTest, ClearSettings) {
|
|
|
| // Initialize the SpdySetting with the default.
|
| spdy_session_pool_->http_server_properties()->SetSpdySetting(
|
| - test_host_port_pair_,
|
| - SETTINGS_MAX_CONCURRENT_STREAMS,
|
| - SETTINGS_FLAG_PLEASE_PERSIST,
|
| - kInitialMaxConcurrentStreams);
|
| + test_scheme_origin_, SETTINGS_MAX_CONCURRENT_STREAMS,
|
| + SETTINGS_FLAG_PLEASE_PERSIST, kInitialMaxConcurrentStreams);
|
|
|
| - EXPECT_FALSE(
|
| - spdy_session_pool_->http_server_properties()->GetSpdySettings(
|
| - test_host_port_pair_).empty());
|
| + EXPECT_FALSE(spdy_session_pool_->http_server_properties()
|
| + ->GetSpdySettings(test_scheme_origin_)
|
| + .empty());
|
|
|
| CreateInsecureSpdySession();
|
|
|
| @@ -1558,9 +1558,9 @@ TEST_P(SpdySessionTest, ClearSettings) {
|
| EXPECT_EQ(OK, stream_releaser.WaitForResult());
|
|
|
| // Make sure that persisted data is cleared.
|
| - EXPECT_TRUE(
|
| - spdy_session_pool_->http_server_properties()->GetSpdySettings(
|
| - test_host_port_pair_).empty());
|
| + EXPECT_TRUE(spdy_session_pool_->http_server_properties()
|
| + ->GetSpdySettings(test_scheme_origin_)
|
| + .empty());
|
|
|
| // Make sure session's max_concurrent_streams is correct.
|
| EXPECT_EQ(kInitialMaxConcurrentStreams + 1,
|
| @@ -1590,10 +1590,8 @@ TEST_P(SpdySessionTest, CancelPendingCreateStream) {
|
|
|
| // Initialize the SpdySetting with 1 max concurrent streams.
|
| spdy_session_pool_->http_server_properties()->SetSpdySetting(
|
| - test_host_port_pair_,
|
| - SETTINGS_MAX_CONCURRENT_STREAMS,
|
| - SETTINGS_FLAG_PLEASE_PERSIST,
|
| - 1);
|
| + test_scheme_origin_, SETTINGS_MAX_CONCURRENT_STREAMS,
|
| + SETTINGS_FLAG_PLEASE_PERSIST, 1);
|
|
|
| CreateInsecureSpdySession();
|
|
|
| @@ -1668,10 +1666,8 @@ TEST_P(SpdySessionTest, SendInitialDataOnNewSession) {
|
| CreateNetworkSession();
|
|
|
| spdy_session_pool_->http_server_properties()->SetSpdySetting(
|
| - test_host_port_pair_,
|
| - SETTINGS_MAX_CONCURRENT_STREAMS,
|
| - SETTINGS_FLAG_PLEASE_PERSIST,
|
| - initial_max_concurrent_streams);
|
| + test_scheme_origin_, SETTINGS_MAX_CONCURRENT_STREAMS,
|
| + SETTINGS_FLAG_PLEASE_PERSIST, initial_max_concurrent_streams);
|
|
|
| SpdySessionPoolPeer pool_peer(spdy_session_pool_);
|
| pool_peer.SetEnableSendingInitialData(true);
|
| @@ -1688,16 +1684,16 @@ TEST_P(SpdySessionTest, ClearSettingsStorageOnIPAddressChanged) {
|
| base::WeakPtr<HttpServerProperties> test_http_server_properties =
|
| spdy_session_pool_->http_server_properties();
|
| SettingsFlagsAndValue flags_and_value1(SETTINGS_FLAG_PLEASE_PERSIST, 2);
|
| - test_http_server_properties->SetSpdySetting(
|
| - test_host_port_pair_,
|
| - SETTINGS_MAX_CONCURRENT_STREAMS,
|
| - SETTINGS_FLAG_PLEASE_PERSIST,
|
| - 2);
|
| - EXPECT_NE(0u, test_http_server_properties->GetSpdySettings(
|
| - test_host_port_pair_).size());
|
| + test_http_server_properties->SetSpdySetting(test_scheme_origin_,
|
| + SETTINGS_MAX_CONCURRENT_STREAMS,
|
| + SETTINGS_FLAG_PLEASE_PERSIST, 2);
|
| + EXPECT_NE(
|
| + 0u,
|
| + test_http_server_properties->GetSpdySettings(test_scheme_origin_).size());
|
| spdy_session_pool_->OnIPAddressChanged();
|
| - EXPECT_EQ(0u, test_http_server_properties->GetSpdySettings(
|
| - test_host_port_pair_).size());
|
| + EXPECT_EQ(
|
| + 0u,
|
| + test_http_server_properties->GetSpdySettings(test_scheme_origin_).size());
|
| }
|
|
|
| TEST_P(SpdySessionTest, Initialize) {
|
|
|