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

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

Issue 2348203003: Fix navigations after HTML5 history push losing their SSL status. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | content/browser/frame_host/navigation_controller_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d489fded1397724f8a94c86f119010faad12eb23..c5a237cd799edd5a717ca093b45dc4ae631f6d3f 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -3225,6 +3225,26 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, InPageNavigationAfterLoadSSLState) {
CheckAuthenticatedState(tab, AuthState::NONE);
}
+// Checks that navigations after pushState maintain the SSL status.
+IN_PROC_BROWSER_TEST_F(SSLUITest, PushStateSSLState) {
+ ASSERT_TRUE(https_server_.Start());
+
+ ui_test_utils::NavigateToURL(browser(),
+ https_server_.GetURL("/ssl/google.html"));
+ content::WebContents* tab =
+ browser()->tab_strip_model()->GetActiveWebContents();
+ CheckAuthenticatedState(tab, AuthState::NONE);
+
+ content::TestNavigationObserver observer(tab);
+ EXPECT_TRUE(ExecuteScript(tab, "history.pushState({}, '', '');"));
+ observer.Wait();
+ CheckAuthenticatedState(tab, AuthState::NONE);
+
+ chrome::GoBack(browser(), WindowOpenDisposition::CURRENT_TAB);
+ content::WaitForLoadStop(tab);
+ CheckAuthenticatedState(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 | content/browser/frame_host/navigation_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698