Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(824)

Unified Diff: net/url_request/url_request_unittest.cc

Issue 10694093: Remove the force_session cookie option, as it's not used anymore (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/url_request_test_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_unittest.cc
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 76aaa9dffe8973d9491fd4ff5778413f715bd94a..1fdfc1dcf0ef74e53a2b67f64af66873e242e818 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -3414,45 +3414,6 @@ TEST_F(URLRequestTest, DoNotSaveCookies_ViaPolicy_Async) {
}
}
-void CheckCookiePolicyCallback(bool* was_run, const CookieList& cookies) {
- EXPECT_EQ(1U, cookies.size());
- EXPECT_FALSE(cookies[0].IsPersistent());
- *was_run = true;
- MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
-}
-
-TEST_F(URLRequestTest, CookiePolicy_ForceSession) {
- LocalHttpTestServer test_server;
- ASSERT_TRUE(test_server.Start());
-
- // Set up a cookie.
- {
- TestNetworkDelegate network_delegate;
- default_context_.set_network_delegate(&network_delegate);
- TestDelegate d;
- network_delegate.set_cookie_options(TestNetworkDelegate::FORCE_SESSION);
- URLRequest req(
- test_server.GetURL(
- "set-cookie?A=1;expires=\"Fri, 05 Feb 2010 23:42:01 GMT\""),
- &d,
- &default_context_);
- req.Start(); // Triggers an asynchronous cookie policy check.
-
- MessageLoop::current()->Run();
-
- EXPECT_EQ(0, network_delegate.blocked_get_cookies_count());
- EXPECT_EQ(0, network_delegate.blocked_set_cookie_count());
- }
- default_context_.set_network_delegate(&default_network_delegate_);
-
- // Now, check the cookie store.
- bool was_run = false;
- default_context_.cookie_store()->GetCookieMonster()->GetAllCookiesAsync(
- base::Bind(&CheckCookiePolicyCallback, &was_run));
- MessageLoop::current()->RunAllPending();
- DCHECK(was_run);
-}
-
// In this test, we do a POST which the server will 302 redirect.
// The subsequent transaction should use GET, and should not send the
// Content-Type header.
« no previous file with comments | « net/url_request/url_request_test_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698