summaryrefslogtreecommitdiffstats
path: root/net/base/cookie_monster_unittest.cc
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-25 02:25:06 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-25 02:25:06 +0000
commitd8eb842474ce559113a9b0ead0610973985bf693 (patch)
tree817d637b7bfffa8bebe3d1de0af0aea05d72a8a7 /net/base/cookie_monster_unittest.cc
parent928930d76cb018b8a496dbdf7166178ef8fab1bf (diff)
downloadchromium_src-d8eb842474ce559113a9b0ead0610973985bf693.zip
chromium_src-d8eb842474ce559113a9b0ead0610973985bf693.tar.gz
chromium_src-d8eb842474ce559113a9b0ead0610973985bf693.tar.bz2
net: Append base:: in the StringPrintf calls.
(Note: This is a TODO in string_util.h) BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3390026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60555 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/cookie_monster_unittest.cc')
-rw-r--r--net/base/cookie_monster_unittest.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/base/cookie_monster_unittest.cc b/net/base/cookie_monster_unittest.cc
index c59dc80..83c7f7d 100644
--- a/net/base/cookie_monster_unittest.cc
+++ b/net/base/cookie_monster_unittest.cc
@@ -11,6 +11,7 @@
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/time.h"
#include "googleurl/src/gurl.h"
#include "net/base/cookie_monster.h"
@@ -1042,7 +1043,7 @@ static void TestHostGarbageCollectHelper(int domain_max_cookies,
scoped_refptr<net::CookieMonster> cm(new net::CookieMonster(NULL, NULL));
cm->SetKeyScheme(new_key_scheme);
for (int i = 0; i < more_than_enough_cookies; ++i) {
- std::string cookie = StringPrintf("a%03d=b", i);
+ std::string cookie = base::StringPrintf("a%03d=b", i);
EXPECT_TRUE(cm->SetCookie(url_google, cookie));
std::string cookies = cm->GetCookies(url_google);
// Make sure we find it in the cookies.
@@ -1063,9 +1064,9 @@ static void TestHostGarbageCollectHelper(int domain_max_cookies,
scoped_refptr<net::CookieMonster> cm(new net::CookieMonster(NULL, NULL));
cm->SetKeyScheme(new_key_scheme);
for (int i = 0; i < more_than_enough_cookies; ++i) {
- std::string cookie_general = StringPrintf("a%03d=b", i);
+ std::string cookie_general = base::StringPrintf("a%03d=b", i);
EXPECT_TRUE(cm->SetCookie(url_google, cookie_general));
- std::string cookie_specific = StringPrintf("c%03d=b", i);
+ std::string cookie_specific = base::StringPrintf("c%03d=b", i);
EXPECT_TRUE(cm->SetCookie(url_google_specific, cookie_specific));
std::string cookies_general = cm->GetCookies(url_google);
EXPECT_NE(cookies_general.find(cookie_general), std::string::npos);
@@ -1117,7 +1118,7 @@ TEST(CookieMonsterTest, TestTotalGarbageCollection) {
// Add a bunch of cookies on a bunch of host, some should get purged.
const GURL sticky_cookie("http://a0000.izzle");
for (int i = 0; i < 4000; ++i) {
- GURL url(StringPrintf("http://a%04d.izzle", i));
+ GURL url(base::StringPrintf("http://a%04d.izzle", i));
EXPECT_TRUE(cm->SetCookie(url, "a=b"));
EXPECT_EQ("a=b", cm->GetCookies(url));
@@ -1132,7 +1133,7 @@ TEST(CookieMonsterTest, TestTotalGarbageCollection) {
// Check that cookies that still exist.
for (int i = 0; i < 4000; ++i) {
- GURL url(StringPrintf("http://a%04d.izzle", i));
+ GURL url(base::StringPrintf("http://a%04d.izzle", i));
if ((i == 0) || (i > 1001)) {
// Cookies should still be around.
EXPECT_FALSE(cm->GetCookies(url).empty());