#include "components/security_interstitials/content/ssl_error_assistant.h"
#include <memory>
#include "components/security_interstitials/content/ssl_error_assistant.pb.h"
#include "content/public/test/test_renderer_host.h"
#include "crypto/sha2.h"
#include "net/cert/asn1_util.h"
#include "net/test/cert_test_util.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/test_certificate_data.h"
#include "net/test/test_data_directory.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
const net::SHA256HashValue kCertPublicKeyHashValue = …;
const uint32_t kLargeVersionId = …;
const char kMisconfigSoftwareCert[] = …;
const char kMisconfigSoftwareRegexCheckCert[] = …;
}
class SSLErrorAssistantTest : public content::RenderViewHostTestHarness { … };
TEST_F(SSLErrorAssistantTest, CaptivePortalCertificateList) { … }
TEST_F(SSLErrorAssistantTest, MitMSoftwareMatching) { … }
TEST_F(SSLErrorAssistantTest, DynamicInterstitialListMatch) { … }
TEST_F(SSLErrorAssistantTest, DynamicInterstitialListComplexRegexMatch) { … }
TEST_F(SSLErrorAssistantTest, DynamicInterstitialListMatchUnknownCertError) { … }
TEST_F(SSLErrorAssistantTest, DynamicInterstitialListNoCommonName) { … }
TEST_F(SSLErrorAssistantTest, DynamicInterstitialListNoOrganizationRegex) { … }
TEST_F(SSLErrorAssistantTest, DynamicInterstitialListNoCertHashes) { … }
TEST_F(SSLErrorAssistantTest, DynamicInterstitialListMatchBlank) { … }
TEST_F(SSLErrorAssistantTest, DynamicInterstitialListCertErrorMismatch) { … }
TEST_F(SSLErrorAssistantTest, DynamicInterstitialListHashesMismatch) { … }
TEST_F(SSLErrorAssistantTest, DynamicInterstitialListCommonNameMismatch) { … }
TEST_F(SSLErrorAssistantTest, DynamicInterstitialListOrganizationMismatch) { … }
TEST_F(SSLErrorAssistantTest, DynamicInterstitialListOverridable) { … }