diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-12 05:02:13 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-12 05:02:13 +0000 |
commit | abf03a02e78533b36aa1a878ee1a2f1bfba13867 (patch) | |
tree | a2093c74713cd37aaf901bc18c9704dac6a89f06 /net/url_request/url_request_unittest.cc | |
parent | 450bf05cbcbaa12b5bfbed1e34799a8867e504a4 (diff) | |
download | chromium_src-abf03a02e78533b36aa1a878ee1a2f1bfba13867.zip chromium_src-abf03a02e78533b36aa1a878ee1a2f1bfba13867.tar.gz chromium_src-abf03a02e78533b36aa1a878ee1a2f1bfba13867.tar.bz2 |
Do not call OnGetCookiesBlocked or OnSetCookieBlocked when cookies are
restricted by load flags. Only issue those callbacks in response to the
CookiePolicy's CanGetCookies / CanSetCookie methods.
R=eroman
BUG=37922
TEST=covered by url_request_unittest.cc
Review URL: http://codereview.chromium.org/893004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41393 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_unittest.cc')
-rw-r--r-- | net/url_request/url_request_unittest.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc index 16f4b3f..a1f0cf5e 100644 --- a/net/url_request/url_request_unittest.cc +++ b/net/url_request/url_request_unittest.cc @@ -1270,7 +1270,9 @@ TEST_F(URLRequestTest, DoNotSendCookies) { EXPECT_TRUE(d.data_received().find("Cookie: CookieToNotSend=1") == std::string::npos); - EXPECT_EQ(1, d.blocked_get_cookies_count()); + + // LOAD_DO_NOT_SEND_COOKIES does not trigger OnGetCookiesBlocked. + EXPECT_EQ(0, d.blocked_get_cookies_count()); EXPECT_EQ(0, d.blocked_set_cookie_count()); } } @@ -1305,8 +1307,9 @@ TEST_F(URLRequestTest, DoNotSaveCookies) { MessageLoop::current()->Run(); + // LOAD_DO_NOT_SAVE_COOKIES does not trigger OnSetCookieBlocked. EXPECT_EQ(0, d.blocked_get_cookies_count()); - EXPECT_EQ(2, d.blocked_set_cookie_count()); + EXPECT_EQ(0, d.blocked_set_cookie_count()); } // Verify the cookies weren't saved or updated. |