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

Unified Diff: net/base/ssl_false_start_blacklist_unittest.cc

Issue 7518035: net: handle trailing dots in LastTwoLabels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 5 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/base/ssl_false_start_blacklist_process.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/ssl_false_start_blacklist_unittest.cc
diff --git a/net/base/ssl_false_start_blacklist_unittest.cc b/net/base/ssl_false_start_blacklist_unittest.cc
index 7eedae47d839b62aeb3fc19141677726c0957288..9c4aff237b50c516f04cf4f9b4dc59ad5bfa3b68 100644
--- a/net/base/ssl_false_start_blacklist_unittest.cc
+++ b/net/base/ssl_false_start_blacklist_unittest.cc
@@ -9,15 +9,17 @@ namespace net {
TEST(SSLFalseStartBlacklistTest, LastTwoLabels) {
#define F SSLFalseStartBlacklist::LastTwoLabels
- EXPECT_STREQ(F("a.b.c.d"), "c.d");
- EXPECT_STREQ(F("a.b"), "a.b");
- EXPECT_STREQ(F("example.com"), "example.com");
- EXPECT_STREQ(F("www.example.com"), "example.com");
- EXPECT_STREQ(F("www.www.example.com"), "example.com");
+ EXPECT_EQ(F("a.b.c.d"), "c.d");
+ EXPECT_EQ(F("a.b"), "a.b");
+ EXPECT_EQ(F("example.com"), "example.com");
+ EXPECT_EQ(F("www.example.com"), "example.com");
+ EXPECT_EQ(F("www.www.example.com"), "example.com");
+ EXPECT_EQ(F("www.www.example.com."), "example.com");
+ EXPECT_EQ(F("www.www.example.com.."), "example.com");
- EXPECT_TRUE(F("com") == NULL);
- EXPECT_TRUE(F(".com") == NULL);
- EXPECT_TRUE(F("") == NULL);
+ EXPECT_TRUE(F("com").empty());
+ EXPECT_TRUE(F(".com").empty());
+ EXPECT_TRUE(F("").empty());
#undef F
}
« no previous file with comments | « net/base/ssl_false_start_blacklist_process.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698