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

Unified Diff: net/cookies/cookie_monster_unittest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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/cookies/canonical_cookie_unittest.cc ('k') | net/cookies/cookie_store_test_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/cookie_monster_unittest.cc
diff --git a/net/cookies/cookie_monster_unittest.cc b/net/cookies/cookie_monster_unittest.cc
index 116d486dd5d81131d48a6b3c9f38e63d949264f4..b3688c3a3188ea06be89ec950754a0b17cabd481 100644
--- a/net/cookies/cookie_monster_unittest.cc
+++ b/net/cookies/cookie_monster_unittest.cc
@@ -233,20 +233,44 @@ class CookieMonsterTest : public CookieStoreTest<CookieMonsterTestTraits> {
base::Time(), false, false));
// Host cookies
- EXPECT_TRUE(this->SetCookieWithDetails(cm, url_top_level_domain_plus_1,
- "host_1", "X", "", "/",
- base::Time(), false, false));
- EXPECT_TRUE(this->SetCookieWithDetails(cm, url_top_level_domain_plus_2,
- "host_2", "X", "", "/",
- base::Time(), false, false));
- EXPECT_TRUE(this->SetCookieWithDetails(cm, url_top_level_domain_plus_3,
- "host_3", "X", "", "/",
- base::Time(), false, false));
+ EXPECT_TRUE(this->SetCookieWithDetails(cm,
+ url_top_level_domain_plus_1,
+ "host_1",
+ "X",
+ std::string(),
+ "/",
+ base::Time(),
+ false,
+ false));
+ EXPECT_TRUE(this->SetCookieWithDetails(cm,
+ url_top_level_domain_plus_2,
+ "host_2",
+ "X",
+ std::string(),
+ "/",
+ base::Time(),
+ false,
+ false));
+ EXPECT_TRUE(this->SetCookieWithDetails(cm,
+ url_top_level_domain_plus_3,
+ "host_3",
+ "X",
+ std::string(),
+ "/",
+ base::Time(),
+ false,
+ false));
// Http_only cookie
- EXPECT_TRUE(this->SetCookieWithDetails(cm, url_top_level_domain_plus_2,
- "httpo_check", "X", "", "/",
- base::Time(), false, true));
+ EXPECT_TRUE(this->SetCookieWithDetails(cm,
+ url_top_level_domain_plus_2,
+ "httpo_check",
+ "X",
+ std::string(),
+ "/",
+ base::Time(),
+ false,
+ true));
// Secure cookies
EXPECT_TRUE(this->SetCookieWithDetails(cm,
@@ -254,9 +278,14 @@ class CookieMonsterTest : public CookieStoreTest<CookieMonsterTestTraits> {
"sec_dom", "X", ".math.harvard.edu",
"/", base::Time(), true, false));
EXPECT_TRUE(this->SetCookieWithDetails(cm,
- url_top_level_domain_plus_2_secure,
- "sec_host", "X", "", "/",
- base::Time(), true, false));
+ url_top_level_domain_plus_2_secure,
+ "sec_host",
+ "X",
+ std::string(),
+ "/",
+ base::Time(),
+ true,
+ false));
// Domain path cookies
EXPECT_TRUE(this->SetCookieWithDetails(cm, url_top_level_domain_plus_2,
@@ -269,14 +298,24 @@ class CookieMonsterTest : public CookieStoreTest<CookieMonsterTestTraits> {
base::Time(), false, false));
// Host path cookies
- EXPECT_TRUE(this->SetCookieWithDetails(cm, url_top_level_domain_plus_2,
- "host_path_1", "X",
- "", "/dir1",
- base::Time(), false, false));
- EXPECT_TRUE(this->SetCookieWithDetails(cm, url_top_level_domain_plus_2,
- "host_path_2", "X",
- "", "/dir1/dir2",
- base::Time(), false, false));
+ EXPECT_TRUE(this->SetCookieWithDetails(cm,
+ url_top_level_domain_plus_2,
+ "host_path_1",
+ "X",
+ std::string(),
+ "/dir1",
+ base::Time(),
+ false,
+ false));
+ EXPECT_TRUE(this->SetCookieWithDetails(cm,
+ url_top_level_domain_plus_2,
+ "host_path_2",
+ "X",
+ std::string(),
+ "/dir1/dir2",
+ base::Time(),
+ false,
+ false));
EXPECT_EQ(13U, this->GetAllCookies(cm).size());
}
@@ -2205,7 +2244,7 @@ TEST_F(CookieMonsterTest, PersisentCookieStorageTest) {
EXPECT_EQ(CookieStoreCommand::ADD, store->commands()[0].type);
// Remove it.
EXPECT_TRUE(SetCookie(cm, url_google_,"A=B; max-age=0"));
- this->MatchCookieLines("", GetCookies(cm, url_google_));
+ this->MatchCookieLines(std::string(), GetCookies(cm, url_google_));
ASSERT_EQ(2u, store->commands().size());
EXPECT_EQ(CookieStoreCommand::REMOVE, store->commands()[1].type);
« no previous file with comments | « net/cookies/canonical_cookie_unittest.cc ('k') | net/cookies/cookie_store_test_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698