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

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

Issue 2408713003: Show red lock icon on captive portal SSL interstitial (Closed)
Patch Set: Created 4 years, 2 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/captive_portal_blocking_page_browsertest.cc
diff --git a/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc b/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc
index 844e94123f0b3fbc9c13d75401c44af3bf1989bc..8c86f436a389531a2eff536b1636c8bffeb12ecb 100644
--- a/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc
+++ b/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ssl/cert_report_helper.h"
#include "chrome/browser/ssl/certificate_reporting_test_utils.h"
+#include "chrome/browser/ssl/chrome_security_state_model_client.h"
#include "chrome/browser/ssl/ssl_cert_reporter.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
@@ -163,6 +164,15 @@ void CaptivePortalBlockingPageTest::TestInterstitial(
EXPECT_EQ(expect_login_url == EXPECT_LOGIN_URL_NO,
IsInterstitialDisplayingText(contents->GetInterstitialPage(),
kGenericLoginURLText));
+
+ // Check that a red/dangerous lock icon is showing on the interstitial.
+ ChromeSecurityStateModelClient* security_model =
+ ChromeSecurityStateModelClient::FromWebContents(contents);
+ ASSERT_TRUE(security_model);
+ security_state::SecurityStateModel::SecurityInfo security_info;
+ security_model->GetSecurityInfo(&security_info);
+ EXPECT_EQ(security_state::SecurityStateModel::DANGEROUS,
+ security_info.security_level);
}
void CaptivePortalBlockingPageTest::TestInterstitial(

Powered by Google App Engine
This is Rietveld 408576698