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

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: 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
« no previous file with comments | « chrome/browser/ssl/ssl_blocking_page.cc ('k') | no next file » | 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 465d7ab86bd8de73a92f5a000bc5d94a97a1a100..c7071ed07eb503a9659a22aeea940b5a6b75dafd 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -2354,6 +2354,31 @@ 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();
+ ui_test_utils::NavigateToURL(
+ browser(), https_server_expired_.GetURL("files/ssl/google.html"));
+
meacer 2015/09/08 22:19:39 I think you should do a WaitForInterstitialAttach
estark 2015/09/08 22:53:59 Done.
+ ASSERT_TRUE(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();
+
meacer 2015/09/08 22:19:39 nit: Remove blank line, or move it above the previ
estark 2015/09/08 22:53:59 Done.
+ EXPECT_TRUE(interstitial_ssl_status.Equals(after_interstitial_ssl_status));
+}
+
class CommonNameMismatchBrowserTest : public CertVerifierBrowserTest {
public:
CommonNameMismatchBrowserTest() : CertVerifierBrowserTest() {}
« no previous file with comments | « 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