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

Unified Diff: net/http/http_server_properties_impl_unittest.cc

Issue 187693003: Add a ClearAlternateProtocol method to HttpServerProperties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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/http/http_server_properties_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_server_properties_impl_unittest.cc
diff --git a/net/http/http_server_properties_impl_unittest.cc b/net/http/http_server_properties_impl_unittest.cc
index fab73705e505386fc08221e9acb8b51efac40806..0ab132d8107b160bcb4d7c994045577d7c9b4c32 100644
--- a/net/http/http_server_properties_impl_unittest.cc
+++ b/net/http/http_server_properties_impl_unittest.cc
@@ -241,6 +241,17 @@ TEST_F(AlternateProtocolServerPropertiesTest, SetBroken) {
<< "Second attempt should be ignored.";
}
+TEST_F(AlternateProtocolServerPropertiesTest, ClearBroken) {
+ HostPortPair test_host_port_pair("foo", 80);
+ impl_.SetBrokenAlternateProtocol(test_host_port_pair);
+ ASSERT_TRUE(impl_.HasAlternateProtocol(test_host_port_pair));
+ PortAlternateProtocolPair alternate =
+ impl_.GetAlternateProtocol(test_host_port_pair);
+ EXPECT_EQ(ALTERNATE_PROTOCOL_BROKEN, alternate.protocol);
+ impl_.ClearAlternateProtocol(test_host_port_pair);
+ EXPECT_FALSE(impl_.HasAlternateProtocol(test_host_port_pair));
+}
+
TEST_F(AlternateProtocolServerPropertiesTest, Forced) {
// Test forced alternate protocols.
« no previous file with comments | « net/http/http_server_properties_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698