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

Unified Diff: chrome/browser/ssl/ssl_browser_tests.cc

Issue 2305093002: Fix incorrect SSL state being shown for client redirects. (Closed)
Patch Set: fix location.replace for same origin Created 4 years, 3 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
Index: chrome/browser/ssl/ssl_browser_tests.cc
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index a52145932ab7fe2ef322385709d0edcb4ae628b5..78cbe80dda12ba423c108ec1505e2f74dea8a096 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -3198,6 +3198,21 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, SamePageHasSSLState) {
CheckAuthenticatedState(tab, AuthState::NONE);
}
+// Checks that if a redirect occurs while the page is loading, the SSL state
+// reflects the final URL.
+IN_PROC_BROWSER_TEST_F(SSLUITest, ClientRedirectSSLState) {
+ ASSERT_TRUE(embedded_test_server()->Start());
+ ASSERT_TRUE(https_server_.Start());
+
+ GURL https_url = https_server_.GetURL("/ssl/redirect.html?");
+ GURL http_url = embedded_test_server()->GetURL("/ssl/google.html");
+
+ GURL url(https_url.spec() + http_url.spec());
+ ui_test_utils::NavigateToURLBlockUntilNavigationsComplete(browser(), url, 2);
+ WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
+ CheckUnauthenticatedState(tab, AuthState::NONE);
+}
+
// TODO(jcampan): more tests to do below.
// Visit a page over https that contains a frame with a redirect.
« no previous file with comments | « no previous file | chrome/test/data/ssl/redirect.html » ('j') | content/browser/frame_host/navigation_controller_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698