Index: net/base/cert_database_nss_unittest.cc |
diff --git a/net/base/cert_database_nss_unittest.cc b/net/base/cert_database_nss_unittest.cc |
index 468c8703304e2cc4baa31fc89937069242977d47..d49090ee4a06efd47415264ace616ff7b31fe02e 100644 |
--- a/net/base/cert_database_nss_unittest.cc |
+++ b/net/base/cert_database_nss_unittest.cc |
@@ -184,8 +184,8 @@ TEST_F(CertDatabaseNSSTest, ImportCACert_SSLTrust) { |
// Import it. |
CertDatabase::ImportCertFailureList failed; |
- EXPECT_EQ(true, cert_db_.ImportCACerts(certs, CertDatabase::TRUSTED_SSL, |
- &failed)); |
+ EXPECT_TRUE(cert_db_.ImportCACerts(certs, CertDatabase::TRUSTED_SSL, |
+ &failed)); |
EXPECT_EQ(0U, failed.size()); |
@@ -216,8 +216,8 @@ TEST_F(CertDatabaseNSSTest, ImportCACert_EmailTrust) { |
// Import it. |
CertDatabase::ImportCertFailureList failed; |
- EXPECT_EQ(true, cert_db_.ImportCACerts(certs, CertDatabase::TRUSTED_EMAIL, |
- &failed)); |
+ EXPECT_TRUE(cert_db_.ImportCACerts(certs, CertDatabase::TRUSTED_EMAIL, |
+ &failed)); |
EXPECT_EQ(0U, failed.size()); |
@@ -247,8 +247,8 @@ TEST_F(CertDatabaseNSSTest, ImportCACert_ObjSignTrust) { |
// Import it. |
CertDatabase::ImportCertFailureList failed; |
- EXPECT_EQ(true, cert_db_.ImportCACerts(certs, CertDatabase::TRUSTED_OBJ_SIGN, |
- &failed)); |
+ EXPECT_TRUE(cert_db_.ImportCACerts(certs, CertDatabase::TRUSTED_OBJ_SIGN, |
+ &failed)); |
EXPECT_EQ(0U, failed.size()); |
@@ -278,8 +278,8 @@ TEST_F(CertDatabaseNSSTest, ImportCA_NotCACert) { |
// Import it. |
CertDatabase::ImportCertFailureList failed; |
- EXPECT_EQ(true, |
- cert_db_.ImportCACerts(certs, CertDatabase::TRUSTED_SSL, &failed)); |
+ EXPECT_TRUE(cert_db_.ImportCACerts(certs, CertDatabase::TRUSTED_SSL, |
+ &failed)); |
ASSERT_EQ(1U, failed.size()); |
// Note: this compares pointers directly. It's okay in this case because |
// ImportCACerts returns the same pointers that were passed in. In the |
@@ -302,9 +302,9 @@ TEST_F(CertDatabaseNSSTest, ImportCACertHierarchy) { |
// work (see |
// http://mxr.mozilla.org/mozilla/source/security/nss/lib/certhigh/certvfy.c#752 |
// "XXX This choice of trustType seems arbitrary.") |
- EXPECT_EQ(true, cert_db_.ImportCACerts( |
- certs, CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL, |
- &failed)); |
+ EXPECT_TRUE(cert_db_.ImportCACerts( |
+ certs, CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL, |
+ &failed)); |
ASSERT_EQ(1U, failed.size()); |
EXPECT_EQ("www.us.army.mil", failed[0].certificate->subject().common_name); |
@@ -322,9 +322,9 @@ TEST_F(CertDatabaseNSSTest, ImportCACertHierarchyDupeRoot) { |
// First import just the root. |
CertDatabase::ImportCertFailureList failed; |
- EXPECT_EQ(true, cert_db_.ImportCACerts( |
- certs, CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL, |
- &failed)); |
+ EXPECT_TRUE(cert_db_.ImportCACerts( |
+ certs, CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL, |
Nico
2011/01/13 16:44:30
revert indentation change
|
+ &failed)); |
EXPECT_EQ(0U, failed.size()); |
CertificateList cert_list = ListCertsInSlot(slot_->os_module_handle()); |
@@ -337,9 +337,9 @@ TEST_F(CertDatabaseNSSTest, ImportCACertHierarchyDupeRoot) { |
// Now import with the other certs in the list too. Even though the root is |
// already present, we should still import the rest. |
failed.clear(); |
- EXPECT_EQ(true, cert_db_.ImportCACerts( |
- certs, CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL, |
- &failed)); |
+ EXPECT_TRUE(cert_db_.ImportCACerts( |
+ certs, CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL, |
Nico
2011/01/13 16:44:30
here too
|
+ &failed)); |
ASSERT_EQ(2U, failed.size()); |
EXPECT_EQ("DoD Root CA 2", failed[0].certificate->subject().common_name); |
@@ -360,8 +360,7 @@ TEST_F(CertDatabaseNSSTest, ImportCACertHierarchyUntrusted) { |
// Import it. |
CertDatabase::ImportCertFailureList failed; |
- EXPECT_EQ(true, cert_db_.ImportCACerts(certs, CertDatabase::UNTRUSTED, |
- &failed)); |
+ EXPECT_TRUE(cert_db_.ImportCACerts(certs, CertDatabase::UNTRUSTED, &failed)); |
ASSERT_EQ(1U, failed.size()); |
EXPECT_EQ("DOD CA-17", failed[0].certificate->subject().common_name); |
@@ -382,9 +381,9 @@ TEST_F(CertDatabaseNSSTest, ImportCACertHierarchyTree) { |
// Import it. |
CertDatabase::ImportCertFailureList failed; |
- EXPECT_EQ(true, cert_db_.ImportCACerts( |
- certs, CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL, |
- &failed)); |
+ EXPECT_TRUE(cert_db_.ImportCACerts( |
+ certs, CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL, |
Nico
2011/01/13 16:44:30
here too
|
+ &failed)); |
EXPECT_EQ(0U, failed.size()); |
@@ -406,9 +405,9 @@ TEST_F(CertDatabaseNSSTest, ImportCACertNotHierarchy) { |
// Import it. |
CertDatabase::ImportCertFailureList failed; |
- EXPECT_EQ(true, cert_db_.ImportCACerts( |
- certs, CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL | |
- CertDatabase::TRUSTED_OBJ_SIGN, &failed)); |
+ EXPECT_TRUE(cert_db_.ImportCACerts( |
+ certs, CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL | |
Nico
2011/01/13 16:44:30
here too
|
+ CertDatabase::TRUSTED_OBJ_SIGN, &failed)); |
ASSERT_EQ(2U, failed.size()); |
// TODO(mattm): should check for net error equivalent of |
@@ -434,7 +433,7 @@ TEST_F(CertDatabaseNSSTest, ImportServerCert) { |
ASSERT_EQ(2U, certs.size()); |
CertDatabase::ImportCertFailureList failed; |
- EXPECT_EQ(true, cert_db_.ImportServerCert(certs, &failed)); |
+ EXPECT_TRUE(cert_db_.ImportServerCert(certs, &failed)); |
EXPECT_EQ(0U, failed.size()); |
@@ -462,7 +461,7 @@ TEST_F(CertDatabaseNSSTest, ImportServerCert_SelfSigned) { |
ASSERT_TRUE(ReadCertIntoList("punycodetest.der", &certs)); |
CertDatabase::ImportCertFailureList failed; |
- EXPECT_EQ(true, cert_db_.ImportServerCert(certs, &failed)); |
+ EXPECT_TRUE(cert_db_.ImportServerCert(certs, &failed)); |
EXPECT_EQ(0U, failed.size()); |
@@ -484,8 +483,8 @@ TEST_F(CertDatabaseNSSTest, ImportServerCert_SelfSigned) { |
// TODO(mattm): this should be SERVER_CERT, not CA_CERT, but that does not |
// work due to NSS bug: https://bugzilla.mozilla.org/show_bug.cgi?id=531160 |
EXPECT_TRUE(cert_db_.SetCertTrust( |
Nico
2011/01/13 16:44:30
here too
|
- puny_cert.get(), CA_CERT, |
- CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL)); |
+ puny_cert.get(), CA_CERT, |
+ CertDatabase::TRUSTED_SSL | CertDatabase::TRUSTED_EMAIL)); |
verify_result.Reset(); |
error = puny_cert->Verify("xn--wgv71a119e.com", flags, &verify_result); |