diff options
author | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 15:02:14 +0000 |
---|---|---|
committer | pfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 15:02:14 +0000 |
commit | dc9f5a5595433b23854691687a4da5b50255f2ad (patch) | |
tree | 2436737115b3109ff1d87ea1cc2ed71e493ce298 /net/base/cookie_monster_unittest.cc | |
parent | 097f48d2f2ca4d24d5468d571c07e2e71749320a (diff) | |
download | chromium_src-dc9f5a5595433b23854691687a4da5b50255f2ad.zip chromium_src-dc9f5a5595433b23854691687a4da5b50255f2ad.tar.gz chromium_src-dc9f5a5595433b23854691687a4da5b50255f2ad.tar.bz2 |
Reverting 30578.
TBR=yurys
Review URL: http://codereview.chromium.org/342057
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/cookie_monster_unittest.cc')
-rw-r--r-- | net/base/cookie_monster_unittest.cc | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/net/base/cookie_monster_unittest.cc b/net/base/cookie_monster_unittest.cc index bb45b68..8fda8db 100644 --- a/net/base/cookie_monster_unittest.cc +++ b/net/base/cookie_monster_unittest.cc @@ -961,44 +961,4 @@ TEST(CookieMonsterTest, SetCookieableSchemes) { EXPECT_FALSE(cm_foo->SetCookie(http_url, "x=1")); } -TEST(CookieMonsterTest, GetRawCookies) { - scoped_refptr<net::CookieMonster> cm(new net::CookieMonster); - GURL url_google(kUrlGoogle); - - net::CookieOptions options; - options.set_include_httponly(); - - // Create a httponly cookie. - EXPECT_TRUE(cm->SetCookieWithOptions(url_google, "A=B; httponly", options)); - - // Get raw cookies. - std::vector<net::CookieMonster::CanonicalCookie> raw_cookies; - cm->GetRawCookies(url_google, &raw_cookies); - EXPECT_TRUE(raw_cookies.begin() != raw_cookies.end()); - net::CookieMonster::CanonicalCookie cookie = *raw_cookies.begin(); - EXPECT_EQ("A", cookie.Name()); -} - -TEST(CookieMonsterTest, DeleteCookieByName) { - scoped_refptr<net::CookieMonster> cm(new net::CookieMonster); - GURL url_google(kUrlGoogle); - - EXPECT_TRUE(cm->SetCookie(url_google, "A=A1; path=/")); - EXPECT_TRUE(cm->SetCookie(url_google, "A=A2; path=/foo")); - EXPECT_TRUE(cm->SetCookie(url_google, "A=A3; path=/bar")); - EXPECT_TRUE(cm->SetCookie(url_google, "B=B1; path=/")); - EXPECT_TRUE(cm->SetCookie(url_google, "B=B2; path=/foo")); - EXPECT_TRUE(cm->SetCookie(url_google, "B=B3; path=/bar")); - - cm->DeleteCookie(GURL(std::string(kUrlGoogle) + "/foo/bar"), "A"); - - net::CookieMonster::CookieList cookies = cm->GetAllCookies(); - EXPECT_EQ(4, cookies.size()); - for (net::CookieMonster::CookieList::iterator it = cookies.begin(); - it != cookies.end(); ++it) { - EXPECT_NE("A1", it->second.Value()); - EXPECT_NE("A2", it->second.Value()); - } -} - // TODO test overwrite cookie |