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

Unified Diff: net/base/host_port_pair_unittest.cc

Issue 8423028: Persist dynamically learned SPDY settings (like CWND). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | « chrome/common/pref_names.cc ('k') | net/http/http_network_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_port_pair_unittest.cc
===================================================================
--- net/base/host_port_pair_unittest.cc (revision 110097)
+++ net/base/host_port_pair_unittest.cc (working copy)
@@ -18,6 +18,16 @@
EXPECT_TRUE(foo.Equals(bar));
}
+TEST(HostPortPairTest, BadString) {
+ HostPortPair foo = HostPortPair::FromString("foo.com:2:3");
+ EXPECT_TRUE(foo.host().empty());
+ EXPECT_EQ(0, foo.port());
+
+ HostPortPair bar = HostPortPair::FromString("bar.com:two");
+ EXPECT_TRUE(bar.host().empty());
+ EXPECT_EQ(0, bar.port());
+}
+
} // namespace
} // namespace net
« no previous file with comments | « chrome/common/pref_names.cc ('k') | net/http/http_network_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698