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

Unified Diff: chrome/browser/errorpage_uitest.cc

Issue 5254005: Do not reset the content settings delegate's cookies when a network error occurred. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/browser/tab_contents
Patch Set: updates Created 10 years, 1 month 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
Index: chrome/browser/errorpage_uitest.cc
diff --git a/chrome/browser/errorpage_uitest.cc b/chrome/browser/errorpage_uitest.cc
index 427f067ac507dac0c4b7cfb0d32252d2ebe3355a..d73a969e7ee119f38375a1201da2e9c0ebcc886b 100644
--- a/chrome/browser/errorpage_uitest.cc
+++ b/chrome/browser/errorpage_uitest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/string_util.h"
+#include "base/utf_string_conversions.h"
#include "chrome/test/automation/tab_proxy.h"
#include "chrome/test/ui/ui_test.h"
#include "chrome/browser/net/url_request_failed_dns_job.h"
@@ -208,3 +209,24 @@ TEST_F(ErrorPageTest, Page404_GoBack) {
EXPECT_TRUE(WaitForTitleMatching(L"Title Of Awesomeness"));
}
+
+// Regression test for http://crbug.com/63649.
+TEST_F(ErrorPageTest, RedirectLoopCookies) {
+ net::TestServer test_server(net::TestServer::TYPE_HTTP,
+ FilePath(FILE_PATH_LITERAL("chrome/test/data")));
+ ASSERT_TRUE(test_server.Start());
+
+ GURL test_url = test_server.GetURL("files/redirect-loop.html");
+
+ ASSERT_TRUE(automation()->GetBrowserWindow(0)->SetDefaultContentSetting(
+ CONTENT_SETTINGS_TYPE_COOKIES, CONTENT_SETTING_BLOCK));
+
+ NavigateToURLBlockUntilNavigationsComplete(test_url, 1);
+ ASSERT_TRUE(
+ WaitForTitleMatching(UTF8ToWide(test_url.spec()) + L" failed to load"));
+
+ bool content_blocked = false;
+ ASSERT_TRUE(GetActiveTab()->IsContentBlocked(CONTENT_SETTINGS_TYPE_COOKIES,
+ &content_blocked));
+ EXPECT_TRUE(content_blocked);
+}

Powered by Google App Engine
This is Rietveld 408576698