summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-21 15:37:11 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-21 15:37:11 +0000
commit14e5bca82b5ac6f0a2b59d087d3f38e19017c127 (patch)
tree216afa47b5a6e9436010323c2df30145c9eb3947 /chrome_frame
parent9f71149c6d3188836bd1e4cfc3997a51b38a3f01 (diff)
downloadchromium_src-14e5bca82b5ac6f0a2b59d087d3f38e19017c127.zip
chromium_src-14e5bca82b5ac6f0a2b59d087d3f38e19017c127.tar.gz
chromium_src-14e5bca82b5ac6f0a2b59d087d3f38e19017c127.tar.bz2
Fix FullTabModeIE_ChromeFrameDeleteCookieTest. The problem was that a domain cookie was being set twice although only set once by the server.
The test itself needed fixing as well as an extra check for domain cookies set by a different url than the current url. There's one other problem remaining however which was initially reported in bug 30786 and I'll get on that next (bug reopened). TEST=Run the FullTabModeIE_ChromeFrameDeleteCookieTest test. BUG=32546, 30786 Review URL: http://codereview.chromium.org/546104 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36749 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/http_negotiate.cc2
-rw-r--r--chrome_frame/test/chrome_frame_unittests.cc4
-rw-r--r--chrome_frame/test/data/fulltab_delete_cookie_test.html20
-rw-r--r--chrome_frame/urlmon_url_request.cc5
4 files changed, 16 insertions, 15 deletions
diff --git a/chrome_frame/http_negotiate.cc b/chrome_frame/http_negotiate.cc
index f118baf..e725f3d 100644
--- a/chrome_frame/http_negotiate.cc
+++ b/chrome_frame/http_negotiate.cc
@@ -199,6 +199,8 @@ HRESULT HttpNegotiatePatch::BeginningTransaction(
HRESULT HttpNegotiatePatch::OnResponse(IHttpNegotiate_OnResponse_Fn original,
IHttpNegotiate* me, DWORD response_code, LPCWSTR response_header,
LPCWSTR request_header, LPWSTR* additional_request_headers) {
+ DLOG(INFO) << __FUNCTION__ << " headers: " << std::endl << response_header;
+
HRESULT hr = original(me, response_code, response_header, request_header,
additional_request_headers);
return hr;
diff --git a/chrome_frame/test/chrome_frame_unittests.cc b/chrome_frame/test/chrome_frame_unittests.cc
index ab12d9e..76a41bc 100644
--- a/chrome_frame/test/chrome_frame_unittests.cc
+++ b/chrome_frame/test/chrome_frame_unittests.cc
@@ -1819,10 +1819,8 @@ TEST_F(ChromeFrameTestWithWebServer,
const wchar_t kChromeFrameFullTabModeDeleteCookieTest[] =
L"files/fulltab_delete_cookie_test.html";
-// TODO(ananta): DISABLED due to:
-// http://code.google.com/p/chromium/issues/detail?id=32546
TEST_F(ChromeFrameTestWithWebServer,
- DISABLED_FullTabModeIE_ChromeFrameDeleteCookieTest) {
+ FullTabModeIE_ChromeFrameDeleteCookieTest) {
chrome_frame_test::TimedMsgLoop loop;
ASSERT_TRUE(LaunchBrowser(IE, kChromeFrameFullTabModeDeleteCookieTest));
diff --git a/chrome_frame/test/data/fulltab_delete_cookie_test.html b/chrome_frame/test/data/fulltab_delete_cookie_test.html
index 62c5df0..975d290 100644
--- a/chrome_frame/test/data/fulltab_delete_cookie_test.html
+++ b/chrome_frame/test/data/fulltab_delete_cookie_test.html
@@ -14,26 +14,22 @@
return;
}
- // The path of the cookie in this test is set to "/." As a result it
- // is set twice, once for the original URL and once for the
- // chrome_frame_tester_helpers.js script. We attempt to delete
- // the cookie twice and validate that the end result is null.
+ // The path of the cookie in this test is set to "/." so it should be
+ // available for all files on the domain but should be set only once.
// First validate that the document cookie contains the substring
- // CF_FullTabDeleteCookie=1; CF_FullTabDeleteCookie=1
+ // "CF_FullTabDeleteCookie=1".
// Then erase the first cookie and validate that it no longer contains
// this string.
- var cookie_found =
- /CF_FullTabDeleteCookie=1; CF_FullTabDeleteCookie=1/.test(
- document.cookie);
+ var original_cookies = document.cookie;
+ var cookie_found = /CF_FullTabDeleteCookie=1/.test(document.cookie);
if (cookie_found) {
eraseCookie("CF_FullTabDeleteCookie");
- cookie_found =
- /CF_FullTabDeleteCookie=1; CF_FullTabDeleteCookie=1/.test(
- document.cookie);
+ cookie_found = /CF_FullTabDeleteCookie=1/.test(document.cookie);
if (!cookie_found) {
onSuccess("FullTab_DeleteCookieTest", 1);
} else {
- onFailure("FullTab_DeleteCookieTest", 1, "Delete cookie failed");
+ onFailure("FullTab_DeleteCookieTest", 1,
+ "CF_FullTabDeleteCookie still exists: " + original_cookies);
}
} else {
onFailure("FullTab_DeleteCookieTest", 1, "Expected cookies not set");
diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc
index 5a946ce..0c16dc5 100644
--- a/chrome_frame/urlmon_url_request.cc
+++ b/chrome_frame/urlmon_url_request.cc
@@ -650,6 +650,8 @@ STDMETHODIMP UrlmonUrlRequest::OnResponse(DWORD dwResponseCode,
const wchar_t* response_headers, const wchar_t* request_headers,
wchar_t** additional_headers) {
DCHECK(worker_thread_ != NULL);
+ DLOG(INFO) << __FUNCTION__ << " " << url() << std::endl << " headers: " <<
+ std::endl << response_headers;
DCHECK_EQ(PlatformThread::CurrentId(), worker_thread_->thread_id());
if (!binding_) {
@@ -693,6 +695,9 @@ STDMETHODIMP UrlmonUrlRequest::OnResponse(DWORD dwResponseCode,
std::string persistent_cookies;
DWORD cookie_size = 0; // NOLINT
+ // Note that there's really no way for us here to distinguish session cookies
+ // from persistent cookies here. Session cookies should get filtered
+ // out on the chrome side as to not be added again.
InternetGetCookie(url_for_persistent_cookies.c_str(), NULL, NULL,
&cookie_size);
if (cookie_size) {