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

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

Issue 2424223002: Update devtools security panel for HTTP-bad (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/chrome_security_state_model_client_unittest.cc
diff --git a/chrome/browser/ssl/chrome_security_state_model_client_unittest.cc b/chrome/browser/ssl/chrome_security_state_model_client_unittest.cc
index 3e933364457064fd3cf7ab5bb2486ccbec68b455..dd61cf51dc95438dc6cb22dc2819d6a66ceab44f 100644
--- a/chrome/browser/ssl/chrome_security_state_model_client_unittest.cc
+++ b/chrome/browser/ssl/chrome_security_state_model_client_unittest.cc
@@ -213,4 +213,18 @@ TEST(ChromeSecurityStateModelClientTest, ConnectionExplanation) {
}
}
+// Tests that a security level of HTTP_SHOW_WARNING produces a
+// content::SecurityStyle of UNAUTHENTICATED, with an explanation.
+TEST(ChromeSecurityStateModelClientTest, HTTPWarning) {
+ security_state::SecurityStateModel::SecurityInfo security_info;
+ content::SecurityStyleExplanations explanations;
+ security_info.security_level =
+ security_state::SecurityStateModel::HTTP_SHOW_WARNING;
+ blink::WebSecurityStyle security_style =
+ ChromeSecurityStateModelClient::GetSecurityStyle(security_info,
+ &explanations);
+ EXPECT_EQ(blink::WebSecurityStyleUnauthenticated, security_style);
+ EXPECT_EQ(1u, explanations.unauthenticated_explanations.size());
+}
+
} // namespace

Powered by Google App Engine
This is Rietveld 408576698