summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authoryongsheng.zhu@intel.com <yongsheng.zhu@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-17 08:44:02 +0000
committeryongsheng.zhu@intel.com <yongsheng.zhu@intel.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-17 08:44:02 +0000
commit99c4c707b2cf4e0096991c47dcaf8ac57bc52eaa (patch)
tree3a830a80d82e43d8ecdfbfe41bb525f3c6292c35 /net
parent1034cb4068d0a90f7342113ae94e3fc1047bfcef (diff)
downloadchromium_src-99c4c707b2cf4e0096991c47dcaf8ac57bc52eaa.zip
chromium_src-99c4c707b2cf4e0096991c47dcaf8ac57bc52eaa.tar.gz
chromium_src-99c4c707b2cf4e0096991c47dcaf8ac57bc52eaa.tar.bz2
Fix the failed case ThreadCheckDeleteSessionCookies on Android
It belongs to net unit tests. On mobile platforms, like Android, persistent session cookies are enabled. So a cookie without expiry time is not expected to be deleted. It depends on the fix for issue #10701167 which enables the macro 'ENABLE_PERSISTENT_SESSION_COOKIES'. BUG= TEST=net_unittests; run_tests.py -s net_unittests Review URL: https://chromiumcodereview.appspot.com/10690188 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146963 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/cookies/cookie_store_unittest.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/cookies/cookie_store_unittest.h b/net/cookies/cookie_store_unittest.h
index 592d52a..5f9dd33 100644
--- a/net/cookies/cookie_store_unittest.h
+++ b/net/cookies/cookie_store_unittest.h
@@ -1095,7 +1095,13 @@ TYPED_TEST_P(MultiThreadedCookieStoreTest, ThreadCheckDeleteSessionCookies) {
"A=B", options));
EXPECT_TRUE(this->SetCookieWithOptions(cs, this->url_google_,
"B=C; expires=Mon, 18-Apr-22 22:50:13 GMT", options));
+
+#if defined(ENABLE_PERSISTENT_SESSION_COOKIES)
+ EXPECT_EQ(0, this->DeleteSessionCookies(cs));
+#else
EXPECT_EQ(1, this->DeleteSessionCookies(cs));
+#endif
+
EXPECT_EQ(0, this->DeleteSessionCookies(cs));
EXPECT_TRUE(this->SetCookieWithOptions(cs, this->url_google_,
@@ -1107,7 +1113,12 @@ TYPED_TEST_P(MultiThreadedCookieStoreTest, ThreadCheckDeleteSessionCookies) {
cs, &callback);
this->RunOnOtherThread(task);
EXPECT_TRUE(callback.did_run());
+
+#if defined(ENABLE_PERSISTENT_SESSION_COOKIES)
+ EXPECT_EQ(0, callback.num_deleted());
+#else
EXPECT_EQ(1, callback.num_deleted());
+#endif
}
REGISTER_TYPED_TEST_CASE_P(MultiThreadedCookieStoreTest,