summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/external_cookie_handler_unittest.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-08 05:55:50 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-08 05:55:50 +0000
commitaeb9efc09906da4c32ec2eaccfb9dfd44f1b4c10 (patch)
treefe41260e4361e23166033b33fed519c63b991357 /chrome/browser/chromeos/external_cookie_handler_unittest.cc
parent799149e6934057e03c11038e39c7875a5eb71fbe (diff)
downloadchromium_src-aeb9efc09906da4c32ec2eaccfb9dfd44f1b4c10.zip
chromium_src-aeb9efc09906da4c32ec2eaccfb9dfd44f1b4c10.tar.gz
chromium_src-aeb9efc09906da4c32ec2eaccfb9dfd44f1b4c10.tar.bz2
Attempt 2 at landing this.
Deleting cookies by setting the expires attribute on them with an empty value would not work in ChromeFrame with the host network stack enabled. When we receive a response in the host browser (IE) we send over the response headers which include the Set-Cookie header and a list of cookies retreived via the InternetGetCookie API. We call this API to retrieve the persistent cookies and send them over to Chrome. However this API returns session cookies as well as persistent cookies. There is no documented way to return only persistent cookies from IE. As a result we would end up setting duplicate cookies in Chrome, which caused this issu.e. To workaround this issue when we receive the response in the url request automation job which handles ChromeFrame network requests, we strip out duplicate cookies sent via InternetGetCookie. When a script deletes a cookie we now handle it correctly in IE and set the data to an empty string. However this does not delete the cookie. When such cookies show up in Chrome, we strip them out as well. Fixes bug http://code.google.com/p/chromium/issues/detail?id=30786 The changes to chrome_frame_npapi.cc/.h are to move the NPAPI functions to the chrome_frame namespace as they conflict with similar functions in NACL. Added the DeleteCookie function to the CookieStore interface, which I think missed out by oversight. Bug=30786 Test=Covered by ChromeFrame unit tests. I also added a unit test to test the newly added URLRequestAutomationJob::IsCookiePresentInCookieHeader function TBR=amit Review URL: http://codereview.chromium.org/521072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35778 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/external_cookie_handler_unittest.cc')
-rw-r--r--chrome/browser/chromeos/external_cookie_handler_unittest.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/external_cookie_handler_unittest.cc b/chrome/browser/chromeos/external_cookie_handler_unittest.cc
index 00fbc8d..b01dd9b 100644
--- a/chrome/browser/chromeos/external_cookie_handler_unittest.cc
+++ b/chrome/browser/chromeos/external_cookie_handler_unittest.cc
@@ -83,6 +83,11 @@ class MockCookieStore : public net::CookieStore {
return std::string();
}
+ virtual void DeleteCookie(const GURL& url,
+ const std::string& cookie_name) {
+ EXPECT_TRUE(false);
+ }
+
private:
std::set<std::string> cookies_;
const GURL expected_url_;