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

Unified Diff: net/http/http_auth_handler_basic_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
Index: net/http/http_auth_handler_basic_unittest.cc
diff --git a/net/http/http_auth_handler_basic_unittest.cc b/net/http/http_auth_handler_basic_unittest.cc
index 4b8c9ff5a99f33d08ff93a9c31ad22171e89a196..72db6ef26b3d3b5db510b7fe298956b50757994a 100644
--- a/net/http/http_auth_handler_basic_unittest.cc
+++ b/net/http/http_auth_handler_basic_unittest.cc
@@ -14,8 +14,12 @@
#include "net/http/http_auth_challenge_tokenizer.h"
#include "net/http/http_request_info.h"
#include "net/ssl/ssl_info.h"
+#include "net/test/gtest_util.h"
+#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+using net::test::IsOk;
+
namespace net {
TEST(HttpAuthHandlerBasicTest, GenerateAuthToken) {
@@ -48,7 +52,7 @@ TEST(HttpAuthHandlerBasicTest, GenerateAuthToken) {
TestCompletionCallback callback;
int rv = basic->GenerateAuthToken(&credentials, &request_info,
callback.callback(), &auth_token);
- EXPECT_EQ(OK, rv);
+ EXPECT_THAT(rv, IsOk());
EXPECT_STREQ(tests[i].expected_credentials, auth_token.c_str());
}
}
« no previous file with comments | « net/http/disk_cache_based_quic_server_info_unittest.cc ('k') | net/http/http_auth_handler_digest_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698