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

Unified Diff: net/spdy/spdy_session_unittest.cc

Issue 1866983006: SHP 2: Change SpdySettingsMap to use SchemeHostPort as the key. No change to Pref data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SHP_1
Patch Set: git sync Created 4 years, 8 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/spdy/spdy_session.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session_unittest.cc
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
index 12ea9d7454b4ec0c6edb6c6a8fd42c297b5e1fd7..bcb34aee0851a3200549e6a2b87f8ec225ab828b 100644
--- a/net/spdy/spdy_session_unittest.cc
+++ b/net/spdy/spdy_session_unittest.cc
@@ -135,8 +135,8 @@ class SpdySessionTest : public PlatformTest,
session_deps_(GetProtocol()),
spdy_session_pool_(nullptr),
test_url_(kDefaultURL),
- test_host_port_pair_(HostPortPair::FromURL(test_url_)),
- key_(test_host_port_pair_,
+ test_server_(test_url_),
+ key_(HostPortPair::FromURL(test_url_),
ProxyServer::Direct(),
PRIVACY_MODE_DISABLED) {
session_deps_.enable_priority_dependencies = GetDependenciesFromPriority();
@@ -210,7 +210,7 @@ class SpdySessionTest : public PlatformTest,
base::WeakPtr<SpdySession> session_;
SpdySessionPool* spdy_session_pool_;
GURL test_url_;
- HostPortPair test_host_port_pair_;
+ url::SchemeHostPort test_server_;
SpdySessionKey key_;
BoundTestNetLog log_;
};
@@ -1546,14 +1546,14 @@ TEST_P(SpdySessionTest, ClearSettings) {
// Initialize the SpdySetting with the default.
spdy_session_pool_->http_server_properties()->SetSpdySetting(
- test_host_port_pair_,
+ test_server_,
SETTINGS_MAX_CONCURRENT_STREAMS,
SETTINGS_FLAG_PLEASE_PERSIST,
kInitialMaxConcurrentStreams);
EXPECT_FALSE(
spdy_session_pool_->http_server_properties()->GetSpdySettings(
- test_host_port_pair_).empty());
+ test_server_).empty());
CreateInsecureSpdySession();
@@ -1579,7 +1579,7 @@ TEST_P(SpdySessionTest, ClearSettings) {
// Make sure that persisted data is cleared.
EXPECT_TRUE(
spdy_session_pool_->http_server_properties()->GetSpdySettings(
- test_host_port_pair_).empty());
+ test_server_).empty());
// Make sure session's max_concurrent_streams is correct.
EXPECT_EQ(kInitialMaxConcurrentStreams + 1,
@@ -1609,7 +1609,7 @@ TEST_P(SpdySessionTest, CancelPendingCreateStream) {
// Initialize the SpdySetting with 1 max concurrent streams.
spdy_session_pool_->http_server_properties()->SetSpdySetting(
- test_host_port_pair_,
+ test_server_,
SETTINGS_MAX_CONCURRENT_STREAMS,
SETTINGS_FLAG_PLEASE_PERSIST,
1);
@@ -1687,7 +1687,7 @@ TEST_P(SpdySessionTest, SendInitialDataOnNewSession) {
CreateNetworkSession();
spdy_session_pool_->http_server_properties()->SetSpdySetting(
- test_host_port_pair_,
+ test_server_,
SETTINGS_MAX_CONCURRENT_STREAMS,
SETTINGS_FLAG_PLEASE_PERSIST,
initial_max_concurrent_streams);
@@ -1708,15 +1708,15 @@ TEST_P(SpdySessionTest, ClearSettingsStorageOnIPAddressChanged) {
spdy_session_pool_->http_server_properties();
SettingsFlagsAndValue flags_and_value1(SETTINGS_FLAG_PLEASE_PERSIST, 2);
test_http_server_properties->SetSpdySetting(
- test_host_port_pair_,
+ test_server_,
SETTINGS_MAX_CONCURRENT_STREAMS,
SETTINGS_FLAG_PLEASE_PERSIST,
2);
EXPECT_NE(0u, test_http_server_properties->GetSpdySettings(
- test_host_port_pair_).size());
+ test_server_).size());
spdy_session_pool_->OnIPAddressChanged();
EXPECT_EQ(0u, test_http_server_properties->GetSpdySettings(
- test_host_port_pair_).size());
+ test_server_).size());
}
TEST_P(SpdySessionTest, Initialize) {
« no previous file with comments | « net/spdy/spdy_session.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698