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

Unified Diff: net/quic/crypto/properties_based_quic_server_info_test.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/quic/bidirectional_stream_quic_impl_unittest.cc ('k') | net/quic/p2p/quic_p2p_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/properties_based_quic_server_info_test.cc
diff --git a/net/quic/crypto/properties_based_quic_server_info_test.cc b/net/quic/crypto/properties_based_quic_server_info_test.cc
index 497e88ce4f467ffc0cac61cf66b2a2dff2cf93c3..f4a58ea1f409c4bc17431fe55436276d24a5377b 100644
--- a/net/quic/crypto/properties_based_quic_server_info_test.cc
+++ b/net/quic/crypto/properties_based_quic_server_info_test.cc
@@ -9,6 +9,8 @@
#include "net/base/net_errors.h"
#include "net/http/http_server_properties_impl.h"
#include "net/quic/quic_server_id.h"
+#include "net/test/gtest_util.h"
+#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
@@ -74,7 +76,8 @@ TEST_F(PropertiesBasedQuicServerInfoTest, Update) {
PropertiesBasedQuicServerInfo server_info1(server_id_,
&http_server_properties_);
server_info1.Start();
- EXPECT_EQ(OK, server_info1.WaitForDataReady(callback_)); // Read the data.
+ EXPECT_THAT(server_info1.WaitForDataReady(callback_),
+ IsOk()); // Read the data.
EXPECT_TRUE(server_info1.IsDataReady());
// Verify the data.
@@ -92,7 +95,8 @@ TEST_F(PropertiesBasedQuicServerInfoTest, Update) {
PropertiesBasedQuicServerInfo server_info2(server_id_,
&http_server_properties_);
server_info2.Start();
- EXPECT_EQ(OK, server_info2.WaitForDataReady(callback_)); // Read the data.
+ EXPECT_THAT(server_info2.WaitForDataReady(callback_),
+ IsOk()); // Read the data.
EXPECT_TRUE(server_info1.IsDataReady());
// Verify updated data.
« no previous file with comments | « net/quic/bidirectional_stream_quic_impl_unittest.cc ('k') | net/quic/p2p/quic_p2p_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698