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

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

Issue 1332633002: Add constructor to create SSLStatus from SSLInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: meacer comments Created 5 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 465d7ab86bd8de73a92f5a000bc5d94a97a1a100..b65f631b1605cdeb93862db60638f60e1bc3523c 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -2354,6 +2354,33 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, BadCertFollowedByGoodCert) {
EXPECT_FALSE(state->HasAllowException(https_server_host));
}
+// Tests that the SSLStatus of a navigation entry for an interstitial
+// matches the navigation entry once the interstitial is clicked
+// through. https://crbug.com/529456
+IN_PROC_BROWSER_TEST_F(SSLUITest,
+ SSLStatusMatchesOnInterstitialAndAfterProceed) {
+ ASSERT_TRUE(https_server_expired_.Start());
+ WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
+ ASSERT_TRUE(tab);
+
+ ui_test_utils::NavigateToURL(
+ browser(), https_server_expired_.GetURL("files/ssl/google.html"));
+ content::WaitForInterstitialAttach(tab);
+ EXPECT_TRUE(tab->ShowingInterstitialPage());
+
+ content::NavigationEntry* entry = tab->GetController().GetActiveEntry();
+ ASSERT_TRUE(entry);
+ content::SSLStatus interstitial_ssl_status = entry->GetSSL();
+
+ ProceedThroughInterstitial(tab);
+ EXPECT_FALSE(tab->ShowingInterstitialPage());
+ entry = tab->GetController().GetActiveEntry();
+ ASSERT_TRUE(entry);
+
+ content::SSLStatus after_interstitial_ssl_status = entry->GetSSL();
+ EXPECT_TRUE(interstitial_ssl_status.Equals(after_interstitial_ssl_status));
+}
+
class CommonNameMismatchBrowserTest : public CertVerifierBrowserTest {
public:
CommonNameMismatchBrowserTest() : CertVerifierBrowserTest() {}
« chrome/browser/ssl/ssl_blocking_page.cc ('K') | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698