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

Unified Diff: net/base/ssl_false_start_blacklist_unittest.cc

Issue 7623015: Revert 95907 - Clean up SSL false start blacklist code. Numerous changes, including: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 96390)
+++ net/base/ssl_false_start_blacklist_unittest.cc (working copy)
@@ -7,17 +7,18 @@
namespace net {
-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");
+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_TRUE(SSLFalseStartBlacklist::LastTwoComponents("com").empty());
- EXPECT_TRUE(SSLFalseStartBlacklist::LastTwoComponents(".com").empty());
- EXPECT_TRUE(SSLFalseStartBlacklist::LastTwoComponents("").empty());
+ EXPECT_TRUE(F("com") == NULL);
+ EXPECT_TRUE(F(".com") == NULL);
+ EXPECT_TRUE(F("") == NULL);
+#undef F
}
TEST(SSLFalseStartBlacklistTest, IsMember) {
Property changes on: net/base/ssl_false_start_blacklist_unittest.cc
___________________________________________________________________
Deleted: svn:eol-style
- LF
« 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