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

Unified Diff: chrome/browser/net/http_server_properties_manager_unittest.cc

Issue 9703050: SPDY - don't persist SpdySettings until we convert it to a map. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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
Index: chrome/browser/net/http_server_properties_manager_unittest.cc
===================================================================
--- chrome/browser/net/http_server_properties_manager_unittest.cc (revision 126690)
+++ chrome/browser/net/http_server_properties_manager_unittest.cc (working copy)
@@ -139,15 +139,6 @@
// Set supports_spdy for www.google.com:80.
server_pref_dict->SetBoolean("supports_spdy", true);
- // Set up the SpdySettings for www.google.com:80.
- base::ListValue* spdy_settings_list = new base::ListValue;
- base::DictionaryValue* spdy_setting_dict = new base::DictionaryValue;
- spdy_setting_dict->SetInteger("flags", spdy::SETTINGS_FLAG_PERSISTED);
- spdy_setting_dict->SetInteger("id", 1234);
- spdy_setting_dict->SetInteger("value", 31337);
- spdy_settings_list->Append(spdy_setting_dict);
- server_pref_dict->Set("settings", spdy_settings_list);
-
// Set up alternate_protocol for www.google.com:80.
base::DictionaryValue* alternate_protocol = new base::DictionaryValue;
alternate_protocol->SetInteger("port", 443);
@@ -170,15 +161,6 @@
// Set supports_spdy for mail.google.com:80
server_pref_dict1->SetBoolean("supports_spdy", true);
- // Set up the SpdySettings for mail.google.com:80
- base::ListValue* spdy_settings_list1 = new base::ListValue;
- base::DictionaryValue* spdy_setting_dict1 = new base::DictionaryValue;
- spdy_setting_dict1->SetInteger("flags", spdy::SETTINGS_FLAG_PERSISTED);
- spdy_setting_dict1->SetInteger("id", 5678);
- spdy_setting_dict1->SetInteger("value", 62667);
- spdy_settings_list1->Append(spdy_setting_dict1);
- server_pref_dict1->Set("settings", spdy_settings_list1);
-
// Set up alternate_protocol for mail.google.com:80
base::DictionaryValue* alternate_protocol1 = new base::DictionaryValue;
alternate_protocol1->SetInteger("port", 444);
@@ -213,25 +195,6 @@
EXPECT_FALSE(http_server_props_manager_->SupportsSpdy(
net::HostPortPair::FromString("foo.google.com:1337")));
- // Verify SpdySettings.
- spdy::SpdySettings spdy_settings_ret =
- http_server_props_manager_->GetSpdySettings(
- net::HostPortPair::FromString("www.google.com:80"));
- ASSERT_EQ(1U, spdy_settings_ret.size());
- spdy::SpdySetting spdy_setting1_ret = spdy_settings_ret.front();
- spdy::SettingsFlagsAndId id1_ret(spdy_setting1_ret.first);
- EXPECT_EQ(1234U, id1_ret.id());
- EXPECT_EQ(spdy::SETTINGS_FLAG_PERSISTED, id1_ret.flags());
- EXPECT_EQ(31337u, spdy_setting1_ret.second);
- spdy_settings_ret = http_server_props_manager_->GetSpdySettings(
- net::HostPortPair::FromString("mail.google.com:80"));
- ASSERT_EQ(1U, spdy_settings_ret.size());
- spdy_setting1_ret = spdy_settings_ret.front();
- id1_ret = spdy_setting1_ret.first;
- EXPECT_EQ(5678U, id1_ret.id());
- EXPECT_EQ(spdy::SETTINGS_FLAG_PERSISTED, id1_ret.flags());
- EXPECT_EQ(62667u, spdy_setting1_ret.second);
-
// Verify AlternateProtocol.
ASSERT_TRUE(http_server_props_manager_->HasAlternateProtocol(
net::HostPortPair::FromString("www.google.com:80")));

Powered by Google App Engine
This is Rietveld 408576698