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

Unified Diff: net/cert/test_root_certs_unittest.cc

Issue 2109503009: Refactor net tests to use GMock matchers for checking net::Error results (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert changes to contents.txt files 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
« no previous file with comments | « net/cert/nss_cert_database_unittest.cc ('k') | net/cert_net/cert_net_fetcher_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/test_root_certs_unittest.cc
diff --git a/net/cert/test_root_certs_unittest.cc b/net/cert/test_root_certs_unittest.cc
index f9e1e0eb18336dc3eb50a148ee190c77daa81c59..b08926f3b93dc69394d700ef5a28de6c698543fc 100644
--- a/net/cert/test_root_certs_unittest.cc
+++ b/net/cert/test_root_certs_unittest.cc
@@ -11,13 +11,17 @@
#include "net/cert/test_root_certs.h"
#include "net/cert/x509_certificate.h"
#include "net/test/cert_test_util.h"
+#include "net/test/gtest_util.h"
#include "net/test/test_data_directory.h"
+#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#if defined(USE_NSS_CERTS)
#include <nss.h>
#endif
+using net::test::IsOk;
+
namespace net {
namespace {
@@ -105,7 +109,7 @@ TEST(TestRootCertsTest, OverrideTrust) {
int good_status =
verify_proc->Verify(test_cert.get(), "127.0.0.1", std::string(), flags,
NULL, CertificateList(), &good_verify_result);
- EXPECT_EQ(OK, good_status);
+ EXPECT_THAT(good_status, IsOk());
EXPECT_EQ(0u, good_verify_result.cert_status);
test_roots->Clear();
« no previous file with comments | « net/cert/nss_cert_database_unittest.cc ('k') | net/cert_net/cert_net_fetcher_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698