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

Unified Diff: ios/web/net/cert_host_pair_unittest.cc

Issue 2000503002: Remove the fingerprint and ca_fingerprint from X509Certificate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_cache
Patch Set: Fix Win & iOS Created 4 years, 6 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/cert_host_pair_unittest.cc
diff --git a/ios/web/net/cert_host_pair_unittest.cc b/ios/web/net/cert_host_pair_unittest.cc
index c8894d744fc39c2a1459bf6fa5c03babae207a45..7efd9f303b8cb463298881999189e36fb15c2aaf 100644
--- a/ios/web/net/cert_host_pair_unittest.cc
+++ b/ios/web/net/cert_host_pair_unittest.cc
@@ -48,8 +48,10 @@ TEST_F(CertHostPairTest, ComparisonWithDifferentCertsAndHosts) {
CertHostPair pair1(cert1, kHostName1);
CertHostPair pair2(cert2, kHostName2);
- EXPECT_TRUE(pair2 < pair1);
- EXPECT_FALSE(pair1 < pair2);
+ EXPECT_FALSE(pair1 < pair1);
+ EXPECT_FALSE(pair2 < pair2);
+ EXPECT_TRUE((pair1 < pair2 && !(pair2 < pair1)) ||
+ (pair2 < pair1 && !(pair1 < pair2)));
}
// Tests comparision with same cert.
@@ -61,8 +63,10 @@ TEST_F(CertHostPairTest, ComparisonWithSameCert) {
CertHostPair pair1(cert1, kHostName1);
CertHostPair pair2(cert2, kHostName2);
- EXPECT_TRUE(pair2 < pair1);
- EXPECT_FALSE(pair1 < pair2);
+ EXPECT_FALSE(pair1 < pair1);
+ EXPECT_FALSE(pair2 < pair2);
+ EXPECT_TRUE((pair1 < pair2 && !(pair2 < pair1)) ||
+ (pair2 < pair1 && !(pair1 < pair2)));
}
// Tests comparision with same host.
@@ -74,8 +78,10 @@ TEST_F(CertHostPairTest, ComparisonWithSameHost) {
CertHostPair pair1(cert1, kHostName1);
CertHostPair pair2(cert2, kHostName1);
- EXPECT_TRUE(pair1 < pair2);
- EXPECT_FALSE(pair2 < pair1);
+ EXPECT_FALSE(pair1 < pair1);
+ EXPECT_FALSE(pair2 < pair2);
+ EXPECT_TRUE((pair1 < pair2 && !(pair2 < pair1)) ||
+ (pair2 < pair1 && !(pair1 < pair2)));
}
// Tests comparision with same cert and host.
@@ -87,6 +93,8 @@ TEST_F(CertHostPairTest, ComparisonWithSameCertAndHost) {
CertHostPair pair1(cert1, kHostName1);
CertHostPair pair2(cert2, kHostName1);
+ EXPECT_FALSE(pair1 < pair1);
+ EXPECT_FALSE(pair2 < pair2);
EXPECT_FALSE(pair1 < pair2);
EXPECT_FALSE(pair2 < pair1);
}

Powered by Google App Engine
This is Rietveld 408576698