summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-22 02:01:50 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-22 02:01:50 +0000
commit0a5210ff6726192d2d6058b1df1c993d8b592b69 (patch)
tree130003c1a44957cb1ab2cfe012e4d7d4f10ddc2c /chrome_frame
parent675a578e829ebcc891b62b6343b04077075b1863 (diff)
downloadchromium_src-0a5210ff6726192d2d6058b1df1c993d8b592b69.zip
chromium_src-0a5210ff6726192d2d6058b1df1c993d8b592b69.tar.gz
chromium_src-0a5210ff6726192d2d6058b1df1c993d8b592b69.tar.bz2
Fix for FullTabModeIE_ChromeFrameDeleteCookieTest and issues with deleting persistent cookies as reported in bug 30786.
TEST=Run FullTabModeIE_ChromeFrameDeleteCookieTest. BUG=32546,30786 Review URL: http://codereview.chromium.org/551101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36831 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/test/chrome_frame_unittests.cc4
-rw-r--r--chrome_frame/test/html_util_unittests.cc20
2 files changed, 21 insertions, 3 deletions
diff --git a/chrome_frame/test/chrome_frame_unittests.cc b/chrome_frame/test/chrome_frame_unittests.cc
index 3c9899f..4467686 100644
--- a/chrome_frame/test/chrome_frame_unittests.cc
+++ b/chrome_frame/test/chrome_frame_unittests.cc
@@ -1841,10 +1841,8 @@ TEST_F(ChromeFrameTestWithWebServer,
const wchar_t kChromeFrameFullTabModeDeleteCookieTest[] =
L"files/fulltab_delete_cookie_test.html";
-// TODO(tommi): Temporarily disabled while figuring out what's going on
-// on the builder.
TEST_F(ChromeFrameTestWithWebServer,
- DISABLED_FullTabModeIE_ChromeFrameDeleteCookieTest) {
+ FullTabModeIE_ChromeFrameDeleteCookieTest) {
chrome_frame_test::TimedMsgLoop loop;
ASSERT_TRUE(LaunchBrowser(IE, kChromeFrameFullTabModeDeleteCookieTest));
diff --git a/chrome_frame/test/html_util_unittests.cc b/chrome_frame/test/html_util_unittests.cc
index 7884638..5670055 100644
--- a/chrome_frame/test/html_util_unittests.cc
+++ b/chrome_frame/test/html_util_unittests.cc
@@ -385,3 +385,23 @@ TEST(HttpCookieTest, IdentifyDuplicateCookieTest) {
"BLAH", header_cookies));
}
+TEST(HttpCookieTest, SetCookiePathToRootIfNotPresentTest) {
+ struct TestCase {
+ std::string input;
+ std::string expected;
+ } test_cases[] = {
+ { "", "" },
+ { "Cookie=value", "Cookie=value; path=/" },
+ { "Cookie=value;", "Cookie=value; path=/" },
+ { "Cookie=value; ", "Cookie=value; path=/" },
+ { " Cookie=value; ", "Cookie=value; path=/" },
+ { "Cookie=", "Cookie=; path=/" },
+ { "Cookie=foo; path=/bar", "Cookie=foo; path=/bar" },
+ };
+
+ for (int i = 0; i < arraysize(test_cases); ++i) {
+ std::string& cookie(test_cases[i].input);
+ URLRequestAutomationJob::SetCookiePathToRootIfNotPresent(&cookie);
+ EXPECT_EQ(cookie, test_cases[i].expected);
+ }
+}