Commit a2b6f52c authored by Matt Mueller's avatar Matt Mueller Committed by Commit Bot

net: http_cache_unittest: use X509Certificate::EqualsIncludingChain

Change-Id: Id2e52e91a95fc56424cd67383e4851d4718e2bfd
Reviewed-on: https://chromium-review.googlesource.com/1011414Reviewed-by: default avatarDavid Benjamin <davidben@chromium.org>
Commit-Queue: Matt Mueller <mattm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550452}
parent c13b8c3f
...@@ -10414,7 +10414,7 @@ TEST(HttpCache, CachePreservesSSLInfo) { ...@@ -10414,7 +10414,7 @@ TEST(HttpCache, CachePreservesSSLInfo) {
// The expected SSL state was reported. // The expected SSL state was reported.
EXPECT_EQ(transaction.ssl_connection_status, EXPECT_EQ(transaction.ssl_connection_status,
response_info.ssl_info.connection_status); response_info.ssl_info.connection_status);
EXPECT_TRUE(cert->Equals(response_info.ssl_info.cert.get())); EXPECT_TRUE(cert->EqualsIncludingChain(response_info.ssl_info.cert.get()));
// Fetch the resource again. // Fetch the resource again.
RunTransactionTestWithResponseInfo(cache.http_cache(), transaction, RunTransactionTestWithResponseInfo(cache.http_cache(), transaction,
...@@ -10427,7 +10427,7 @@ TEST(HttpCache, CachePreservesSSLInfo) { ...@@ -10427,7 +10427,7 @@ TEST(HttpCache, CachePreservesSSLInfo) {
// The SSL state was preserved. // The SSL state was preserved.
EXPECT_EQ(status, response_info.ssl_info.connection_status); EXPECT_EQ(status, response_info.ssl_info.connection_status);
EXPECT_TRUE(cert->Equals(response_info.ssl_info.cert.get())); EXPECT_TRUE(cert->EqualsIncludingChain(response_info.ssl_info.cert.get()));
} }
// Tests that SSLInfo gets updated when revalidating a cached response. // Tests that SSLInfo gets updated when revalidating a cached response.
...@@ -10467,7 +10467,7 @@ TEST(HttpCache, RevalidationUpdatesSSLInfo) { ...@@ -10467,7 +10467,7 @@ TEST(HttpCache, RevalidationUpdatesSSLInfo) {
// The expected SSL state was reported. // The expected SSL state was reported.
EXPECT_EQ(status1, response_info.ssl_info.connection_status); EXPECT_EQ(status1, response_info.ssl_info.connection_status);
EXPECT_TRUE(cert1->Equals(response_info.ssl_info.cert.get())); EXPECT_TRUE(cert1->EqualsIncludingChain(response_info.ssl_info.cert.get()));
// The server deploys a more modern configuration but reports 304 on the // The server deploys a more modern configuration but reports 304 on the
// revalidation attempt. // revalidation attempt.
...@@ -10488,7 +10488,7 @@ TEST(HttpCache, RevalidationUpdatesSSLInfo) { ...@@ -10488,7 +10488,7 @@ TEST(HttpCache, RevalidationUpdatesSSLInfo) {
// The new SSL state is reported. // The new SSL state is reported.
EXPECT_EQ(status2, response_info.ssl_info.connection_status); EXPECT_EQ(status2, response_info.ssl_info.connection_status);
EXPECT_TRUE(cert2->Equals(response_info.ssl_info.cert.get())); EXPECT_TRUE(cert2->EqualsIncludingChain(response_info.ssl_info.cert.get()));
} }
TEST(HttpCache, CacheEntryStatusOther) { TEST(HttpCache, CacheEntryStatusOther) {
......
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