Commit 930023d3 authored by Justin Cohen's avatar Justin Cohen Committed by Commit Bot

[ios] Unauthenticated pages should always be NORMAL_CONTENT.

BUG=799345

Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I760f36dcf8cb9f47322ecf8d5134f73957e2bf8f
Reviewed-on: https://chromium-review.googlesource.com/897185Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Reviewed-by: default avatarKurt Horimoto <kkhorimoto@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534074}
parent e2e467d1
......@@ -107,6 +107,7 @@ using web::SecurityStyle;
if (!item->GetURL().SchemeIsCryptographic()) {
// HTTP or other non-secure connection.
item->GetSSL().security_style = web::SECURITY_STYLE_UNAUTHENTICATED;
item->GetSSL().content_status = web::SSLStatus::NORMAL_CONTENT;
} else {
// HTTPS, no certificate (this use-case has not been observed).
item->GetSSL().security_style = web::SECURITY_STYLE_UNKNOWN;
......
......@@ -161,10 +161,12 @@ TEST_F(CRWSSLStatusUpdaterTest, HttpItem) {
// No certificate for http.
EXPECT_FALSE(!!item->GetSSL().certificate);
// Always normal content for http.
EXPECT_EQ(web::SSLStatus::NORMAL_CONTENT, item->GetSSL().content_status);
// Make sure that security style and content status did change.
EXPECT_EQ(web::SECURITY_STYLE_UNAUTHENTICATED, item->GetSSL().security_style);
EXPECT_EQ(web::SSLStatus::DISPLAYED_INSECURE_CONTENT,
item->GetSSL().content_status);
}
// Tests that delegate callback is not called if no changes were made to http
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment