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

Unified Diff: ios/web/net/crw_ssl_status_updater_unittest.mm

Issue 2327433002: Stop using CertStore which is not compatible with PlzNavigate. (Closed)
Patch Set: remove certstore on non-ios and update plznavigate test filter Created 4 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: ios/web/net/crw_ssl_status_updater_unittest.mm
diff --git a/ios/web/net/crw_ssl_status_updater_unittest.mm b/ios/web/net/crw_ssl_status_updater_unittest.mm
index b812bb6e3adfa512a6d822db5d56be3c4a0a9137..e316e25d830485283c4376eb0e56bc79699909bd 100644
--- a/ios/web/net/crw_ssl_status_updater_unittest.mm
+++ b/ios/web/net/crw_ssl_status_updater_unittest.mm
@@ -147,7 +147,7 @@ TEST_F(CRWSSLStatusUpdaterTest, HttpItem) {
hasOnlySecureContent:NO];
// No certificate for http.
- EXPECT_FALSE(item->GetSSL().cert_id);
+ EXPECT_FALSE(!!item->GetSSL().certificate.get());
// 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,
@@ -166,7 +166,7 @@ TEST_F(CRWSSLStatusUpdaterTest, NoChangesToHttpItem) {
trust:trust_
hasOnlySecureContent:YES];
// No certificate for http.
- EXPECT_FALSE(item->GetSSL().cert_id);
+ EXPECT_FALSE(!!item->GetSSL().certificate.get());
// Make sure that security style did not change.
EXPECT_EQ(web::SECURITY_STYLE_UNAUTHENTICATED, item->GetSSL().security_style);
}
@@ -188,7 +188,7 @@ TEST_F(CRWSSLStatusUpdaterTest, HttpsItemNoCert) {
trust:base::ScopedCFTypeRef<SecTrustRef>()
hasOnlySecureContent:YES];
// No certificate.
- EXPECT_FALSE(item->GetSSL().cert_id);
+ EXPECT_FALSE(!!item->GetSSL().certificate.get());
// Make sure that security style did change.
EXPECT_EQ(web::SECURITY_STYLE_UNKNOWN, item->GetSSL().security_style);
EXPECT_EQ(web::SSLStatus::NORMAL_CONTENT, item->GetSSL().content_status);
@@ -201,8 +201,7 @@ TEST_F(CRWSSLStatusUpdaterTest, HttpsItemNoCertReverification) {
web::NavigationItem* item = nav_manager_->GetLastCommittedItem();
// Set SSL status manually in the way so cert re-verification is not run.
item->GetSSL().cert_status_host = base::SysNSStringToUTF8(kHostName);
- item->GetSSL().cert_id = web::CertStore::GetInstance()->StoreCert(
- web::CreateCertFromTrust(trust_).get(), kCertGroupID);
+ item->GetSSL().certificate = web::CreateCertFromTrust(trust_);
// Make sure that item change callback was called.
[[delegate_ expect] SSLStatusUpdater:ssl_status_updater_
@@ -355,7 +354,7 @@ TEST_F(CRWSSLStatusUpdaterTest, CertChanged) {
EXPECT_FALSE(item->GetSSL().cert_status);
// Change the cert.
- item->GetSSL().cert_id = -1;
+ item->GetSSL().certificate = nullptr;
// Reply with calculated cert verification status.
[data_source_

Powered by Google App Engine
This is Rietveld 408576698