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

Unified Diff: net/spdy/spdy_network_transaction_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: remove commented line 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
Index: net/spdy/spdy_network_transaction_unittest.cc
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc
index 900f1038a4544f3d3b135b57501e02bca84349b6..bb4714066985ce7cd70650054fd93ef093762209 100644
--- a/net/spdy/spdy_network_transaction_unittest.cc
+++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -4227,9 +4227,12 @@ TEST_P(SpdyNetworkTransactionTest, SettingsSaved) {
// Verify that no settings exist initially.
HostPortPair host_port_pair("www.example.org", helper.port());
+ url::SchemeHostPort spdy_server("https", host_port_pair.host(),
+ host_port_pair.port());
+
SpdySessionPool* spdy_session_pool = helper.session()->spdy_session_pool();
EXPECT_TRUE(spdy_session_pool->http_server_properties()->GetSpdySettings(
- host_port_pair).empty());
+ spdy_server).empty());
// Construct the request.
scoped_ptr<SpdySerializedFrame> req(
@@ -4287,7 +4290,7 @@ TEST_P(SpdyNetworkTransactionTest, SettingsSaved) {
// Verify we had two persisted settings.
const SettingsMap& settings_map =
spdy_session_pool->http_server_properties()->GetSpdySettings(
- host_port_pair);
+ spdy_server);
ASSERT_EQ(2u, settings_map.size());
// Verify the first persisted setting.
@@ -4338,8 +4341,10 @@ TEST_P(SpdyNetworkTransactionTest, SettingsPlayback) {
// Verify that no settings exist initially.
HostPortPair host_port_pair("www.example.org", helper.port());
+ url::SchemeHostPort spdy_server("https", host_port_pair.host(),
+ host_port_pair.port());
EXPECT_TRUE(spdy_session_pool->http_server_properties()->GetSpdySettings(
- host_port_pair).empty());
+ spdy_server).empty());
const SpdySettingsIds kSampleId1 = SETTINGS_MAX_CONCURRENT_STREAMS;
unsigned int kSampleValue1 = 0x0a0a0a0a;
@@ -4348,20 +4353,20 @@ TEST_P(SpdyNetworkTransactionTest, SettingsPlayback) {
// First add a persisted setting.
spdy_session_pool->http_server_properties()->SetSpdySetting(
- host_port_pair,
+ spdy_server,
kSampleId1,
SETTINGS_FLAG_PLEASE_PERSIST,
kSampleValue1);
// Next add another persisted setting.
spdy_session_pool->http_server_properties()->SetSpdySetting(
- host_port_pair,
+ spdy_server,
kSampleId2,
SETTINGS_FLAG_PLEASE_PERSIST,
kSampleValue2);
EXPECT_EQ(2u, spdy_session_pool->http_server_properties()->GetSpdySettings(
- host_port_pair).size());
+ spdy_server).size());
// Construct the initial SETTINGS frame.
SettingsMap initial_settings;
@@ -4372,8 +4377,7 @@ TEST_P(SpdyNetworkTransactionTest, SettingsPlayback) {
// Construct the persisted SETTINGS frame.
const SettingsMap& settings =
- spdy_session_pool->http_server_properties()->GetSpdySettings(
- host_port_pair);
+ spdy_session_pool->http_server_properties()->GetSpdySettings(spdy_server);
scoped_ptr<SpdySerializedFrame> settings_frame(
spdy_util_.ConstructSpdySettings(settings));
@@ -4415,7 +4419,7 @@ TEST_P(SpdyNetworkTransactionTest, SettingsPlayback) {
// Verify we had two persisted settings.
const SettingsMap& settings_map =
spdy_session_pool->http_server_properties()->GetSpdySettings(
- host_port_pair);
+ spdy_server);
ASSERT_EQ(2u, settings_map.size());
// Verify the first persisted setting.

Powered by Google App Engine
This is Rietveld 408576698