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

Unified Diff: net/base/ssl_false_start_blacklist_unittest.cc

Issue 7903016: Fourth attempt at the following. Unreviewed, this was originally reviewed in http://codereview.c... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 3 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') | net/net.gyp » ('j') | 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
===================================================================
--- net/base/ssl_false_start_blacklist_unittest.cc (revision 101373)
+++ net/base/ssl_false_start_blacklist_unittest.cc (working copy)
@@ -7,18 +7,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");
+TEST(SSLFalseStartBlacklistTest, LastTwoComponents) {
+ EXPECT_EQ(SSLFalseStartBlacklist::LastTwoComponents("a.b.c.d"), "c.d");
+ EXPECT_EQ(SSLFalseStartBlacklist::LastTwoComponents("a.b"), "a.b");
+ EXPECT_EQ(SSLFalseStartBlacklist::LastTwoComponents("www.a.de"), "a.de");
+ EXPECT_EQ(SSLFalseStartBlacklist::LastTwoComponents("www.www.a.de"), "a.de");
+ EXPECT_EQ(SSLFalseStartBlacklist::LastTwoComponents("a.com."), "a.com");
+ EXPECT_EQ(SSLFalseStartBlacklist::LastTwoComponents("a.com.."), "a.com");
- EXPECT_TRUE(F("com") == NULL);
- EXPECT_TRUE(F(".com") == NULL);
- EXPECT_TRUE(F("") == NULL);
-#undef F
+ EXPECT_TRUE(SSLFalseStartBlacklist::LastTwoComponents("com").empty());
+ EXPECT_TRUE(SSLFalseStartBlacklist::LastTwoComponents(".com").empty());
+ EXPECT_TRUE(SSLFalseStartBlacklist::LastTwoComponents("").empty());
}
TEST(SSLFalseStartBlacklistTest, IsMember) {
« no previous file with comments | « net/base/ssl_false_start_blacklist_process.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698