summaryrefslogtreecommitdiffstats
path: root/net/base/static_cookie_policy_unittest.cc
diff options
context:
space:
mode:
authorjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-12 08:47:57 +0000
committerjochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-12 08:47:57 +0000
commit4c6452d27812f765c27aefb673eee90a17edbb82 (patch)
tree3e61dc8e740278a4b2a140102b4895203508b846 /net/base/static_cookie_policy_unittest.cc
parent6340f49d48a13c600319fc60f774f5ad6e3103e8 (diff)
downloadchromium_src-4c6452d27812f765c27aefb673eee90a17edbb82.zip
chromium_src-4c6452d27812f765c27aefb673eee90a17edbb82.tar.gz
chromium_src-4c6452d27812f765c27aefb673eee90a17edbb82.tar.bz2
Clarify wording around blocking 3rd party cookies and add lab to block reading of 3rd party cookies
BUG=69066 TEST=net_unittests Review URL: http://codereview.chromium.org/6207005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71148 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/static_cookie_policy_unittest.cc')
-rw-r--r--net/base/static_cookie_policy_unittest.cc20
1 files changed, 18 insertions, 2 deletions
diff --git a/net/base/static_cookie_policy_unittest.cc b/net/base/static_cookie_policy_unittest.cc
index 35c1a82..57dc4fa 100644
--- a/net/base/static_cookie_policy_unittest.cc
+++ b/net/base/static_cookie_policy_unittest.cc
@@ -62,8 +62,8 @@ TEST_F(StaticCookiePolicyTest, AllowAllCookiesTest) {
EXPECT_EQ(net::OK, CanSetCookie(url_google_, GURL()));
}
-TEST_F(StaticCookiePolicyTest, BlockThirdPartyCookiesTest) {
- SetPolicyType(net::StaticCookiePolicy::BLOCK_THIRD_PARTY_COOKIES);
+TEST_F(StaticCookiePolicyTest, BlockSettingThirdPartyCookiesTest) {
+ SetPolicyType(net::StaticCookiePolicy::BLOCK_SETTING_THIRD_PARTY_COOKIES);
EXPECT_EQ(net::OK, CanGetCookies(url_google_, url_google_));
EXPECT_EQ(net::OK, CanGetCookies(url_google_, url_google_secure_));
@@ -78,6 +78,22 @@ TEST_F(StaticCookiePolicyTest, BlockThirdPartyCookiesTest) {
EXPECT_EQ(net::OK, CanSetCookie(url_google_, GURL()));
}
+TEST_F(StaticCookiePolicyTest, BlockAllThirdPartyCookiesTest) {
+ SetPolicyType(net::StaticCookiePolicy::BLOCK_ALL_THIRD_PARTY_COOKIES);
+
+ EXPECT_EQ(net::OK, CanGetCookies(url_google_, url_google_));
+ EXPECT_EQ(net::OK, CanGetCookies(url_google_, url_google_secure_));
+ EXPECT_EQ(net::OK, CanGetCookies(url_google_, url_google_mail_));
+ EXPECT_NE(net::OK, CanGetCookies(url_google_, url_google_analytics_));
+ EXPECT_EQ(net::OK, CanGetCookies(url_google_, GURL()));
+
+ EXPECT_EQ(net::OK, CanSetCookie(url_google_, url_google_));
+ EXPECT_EQ(net::OK, CanSetCookie(url_google_, url_google_secure_));
+ EXPECT_EQ(net::OK, CanSetCookie(url_google_, url_google_mail_));
+ EXPECT_NE(net::OK, CanSetCookie(url_google_, url_google_analytics_));
+ EXPECT_EQ(net::OK, CanSetCookie(url_google_, GURL()));
+}
+
TEST_F(StaticCookiePolicyTest, BlockAllCookiesTest) {
SetPolicyType(net::StaticCookiePolicy::BLOCK_ALL_COOKIES);