Index: chrome/browser/renderer_host/test/render_view_host_browsertest.cc |
diff --git a/chrome/browser/renderer_host/test/render_view_host_browsertest.cc b/chrome/browser/renderer_host/test/render_view_host_browsertest.cc |
index c93a3a5281afd797c2351addb2cf4539d7680692..4989e6a7cda8e1f6d1d4f4e1e52151198686816c 100644 |
--- a/chrome/browser/renderer_host/test/render_view_host_browsertest.cc |
+++ b/chrome/browser/renderer_host/test/render_view_host_browsertest.cc |
@@ -4,8 +4,11 @@ |
#include "base/utf_string_conversions.h" |
#include "base/values.h" |
+#include "chrome/browser/host_content_settings_map.h" |
+#include "chrome/browser/profile.h" |
#include "chrome/browser/renderer_host/render_view_host.h" |
#include "chrome/browser/tab_contents/tab_contents.h" |
+#include "chrome/browser/tab_contents/tab_specific_content_settings.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/test/in_process_browser_test.h" |
#include "chrome/test/ui_test_utils.h" |
@@ -91,3 +94,22 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostTest, |
EXPECT_FALSE(bool_value); |
} |
} |
+ |
+// Regression test for http://crbug.com/63649. |
+IN_PROC_BROWSER_TEST_F(RenderViewHostTest, RedirectLoopCookies) { |
+ ASSERT_TRUE(test_server()->Start()); |
+ |
+ GURL test_url = test_server()->GetURL("files/redirect-loop.html"); |
+ |
+ browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting( |
+ CONTENT_SETTINGS_TYPE_COOKIES, CONTENT_SETTING_BLOCK); |
+ |
+ ui_test_utils::NavigateToURL(browser(), test_url); |
+ |
+ TabContents* tab_contents = browser()->GetSelectedTabContents(); |
+ ASSERT_EQ(UTF8ToUTF16(test_url.spec() + " failed to load"), |
+ tab_contents->GetTitle()); |
+ |
+ EXPECT_TRUE(tab_contents->GetTabSpecificContentSettings()->IsContentBlocked( |
+ CONTENT_SETTINGS_TYPE_COOKIES)); |
+} |