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

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

Issue 275953002: Remove HTTP pipelining support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 6 years, 7 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
diff --git a/chrome/browser/net/http_server_properties_manager_unittest.cc b/chrome/browser/net/http_server_properties_manager_unittest.cc
index 64da47a8fb693eb05a680610d1952df7c0af5387..5aa3a38c426f7c522f2a83e005ffeead51aae87b 100644
--- a/chrome/browser/net/http_server_properties_manager_unittest.cc
+++ b/chrome/browser/net/http_server_properties_manager_unittest.cc
@@ -61,17 +61,15 @@ class TestingHttpServerPropertiesManager : public HttpServerPropertiesManager {
MOCK_METHOD0(UpdateCacheFromPrefsOnUI, void());
MOCK_METHOD1(UpdatePrefsFromCacheOnIO, void(const base::Closure&));
- MOCK_METHOD5(UpdateCacheFromPrefsOnIO,
+ MOCK_METHOD4(UpdateCacheFromPrefsOnIO,
void(std::vector<std::string>* spdy_servers,
net::SpdySettingsMap* spdy_settings_map,
net::AlternateProtocolMap* alternate_protocol_map,
- net::PipelineCapabilityMap* pipeline_capability_map,
bool detected_corrupted_prefs));
- MOCK_METHOD4(UpdatePrefsOnUI,
+ MOCK_METHOD3(UpdatePrefsOnUI,
void(base::ListValue* spdy_server_list,
net::SpdySettingsMap* spdy_settings_map,
- net::AlternateProtocolMap* alternate_protocol_map,
- net::PipelineCapabilityMap* pipeline_capability_map));
+ net::AlternateProtocolMap* alternate_protocol_map));
private:
DISALLOW_COPY_AND_ASSIGN(TestingHttpServerPropertiesManager);
@@ -156,9 +154,6 @@ TEST_F(HttpServerPropertiesManagerTest,
server_pref_dict->SetWithoutPathExpansion(
"alternate_protocol", alternate_protocol);
- // Set pipeline capability for www.google.com:80.
- server_pref_dict->SetInteger("pipeline_capability", net::PIPELINE_CAPABLE);
-
// Set the server preference for www.google.com:80.
base::DictionaryValue* servers_dict = new base::DictionaryValue;
servers_dict->SetWithoutPathExpansion(
@@ -178,9 +173,6 @@ TEST_F(HttpServerPropertiesManagerTest,
server_pref_dict1->SetWithoutPathExpansion(
"alternate_protocol", alternate_protocol1);
- // Set pipelining capability for mail.google.com:80
- server_pref_dict1->SetInteger("pipeline_capability", net::PIPELINE_INCAPABLE);
-
// Set the server preference for mail.google.com:80.
servers_dict->SetWithoutPathExpansion(
"mail.google.com:80", server_pref_dict1);
@@ -224,14 +216,6 @@ TEST_F(HttpServerPropertiesManagerTest,
net::HostPortPair::FromString("mail.google.com:80"));
EXPECT_EQ(444, port_alternate_protocol.port);
EXPECT_EQ(net::NPN_SPDY_3_1, port_alternate_protocol.protocol);
-
- // Verify pipeline capability.
- EXPECT_EQ(net::PIPELINE_CAPABLE,
- http_server_props_manager_->GetPipelineCapability(
- net::HostPortPair::FromString("www.google.com:80")));
- EXPECT_EQ(net::PIPELINE_INCAPABLE,
- http_server_props_manager_->GetPipelineCapability(
- net::HostPortPair::FromString("mail.google.com:80")));
}
TEST_F(HttpServerPropertiesManagerTest, SupportsSpdy) {
@@ -374,33 +358,6 @@ TEST_F(HttpServerPropertiesManagerTest, HasAlternateProtocol) {
EXPECT_EQ(net::NPN_SPDY_3, port_alternate_protocol.protocol);
}
-TEST_F(HttpServerPropertiesManagerTest, PipelineCapability) {
- ExpectPrefsUpdate();
-
- net::HostPortPair known_pipeliner("pipeline.com", 8080);
- net::HostPortPair bad_pipeliner("wordpress.com", 80);
- EXPECT_EQ(net::PIPELINE_UNKNOWN,
- http_server_props_manager_->GetPipelineCapability(known_pipeliner));
- EXPECT_EQ(net::PIPELINE_UNKNOWN,
- http_server_props_manager_->GetPipelineCapability(bad_pipeliner));
-
- // Post an update task to the IO thread. SetPipelineCapability calls
- // ScheduleUpdatePrefsOnIO.
- http_server_props_manager_->SetPipelineCapability(known_pipeliner,
- net::PIPELINE_CAPABLE);
- http_server_props_manager_->SetPipelineCapability(bad_pipeliner,
- net::PIPELINE_INCAPABLE);
-
- // Run the task.
- loop_.RunUntilIdle();
-
- EXPECT_EQ(net::PIPELINE_CAPABLE,
- http_server_props_manager_->GetPipelineCapability(known_pipeliner));
- EXPECT_EQ(net::PIPELINE_INCAPABLE,
- http_server_props_manager_->GetPipelineCapability(bad_pipeliner));
- Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
-}
-
TEST_F(HttpServerPropertiesManagerTest, Clear) {
ExpectPrefsUpdate();
@@ -415,10 +372,6 @@ TEST_F(HttpServerPropertiesManagerTest, Clear) {
http_server_props_manager_->SetSpdySetting(
spdy_server_mail, id1, flags1, value1);
- net::HostPortPair known_pipeliner("pipeline.com", 8080);
- http_server_props_manager_->SetPipelineCapability(known_pipeliner,
- net::PIPELINE_CAPABLE);
-
// Run the task.
loop_.RunUntilIdle();
@@ -436,9 +389,6 @@ TEST_F(HttpServerPropertiesManagerTest, Clear) {
EXPECT_EQ(net::SETTINGS_FLAG_PERSISTED, flags_and_value1_ret.first);
EXPECT_EQ(value1, flags_and_value1_ret.second);
- EXPECT_EQ(net::PIPELINE_CAPABLE,
- http_server_props_manager_->GetPipelineCapability(known_pipeliner));
-
Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
ExpectPrefsUpdate();
@@ -455,9 +405,6 @@ TEST_F(HttpServerPropertiesManagerTest, Clear) {
http_server_props_manager_->GetSpdySettings(spdy_server_mail);
EXPECT_EQ(0U, settings_map2_ret.size());
- EXPECT_EQ(net::PIPELINE_UNKNOWN,
- http_server_props_manager_->GetPipelineCapability(known_pipeliner));
-
Mock::VerifyAndClearExpectations(http_server_props_manager_.get());
}

Powered by Google App Engine
This is Rietveld 408576698