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

Unified Diff: net/spdy/spdy_test_util_common.cc

Issue 2007373004: Fix test expectations to use bool checks rather than null compares (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/spdy/spdy_stream_unittest.cc ('k') | remoting/protocol/fake_datagram_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_test_util_common.cc
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc
index 92c9c58675735a9a11bbf2873588ceae69c42c98..4c59d99e9f42503ac8ce08465a608e898ed51c14 100644
--- a/net/spdy/spdy_test_util_common.cc
+++ b/net/spdy/spdy_test_util_common.cc
@@ -495,7 +495,8 @@ SpdyURLRequestContext::~SpdyURLRequestContext() {
}
bool HasSpdySession(SpdySessionPool* pool, const SpdySessionKey& key) {
- return pool->FindAvailableSession(key, GURL(), BoundNetLog()) != NULL;
+ return static_cast<bool>(
+ pool->FindAvailableSession(key, GURL(), BoundNetLog()));
}
namespace {
@@ -551,7 +552,7 @@ base::WeakPtr<SpdySession> CreateSpdySessionHelper(
http_session->spdy_session_pool()->CreateAvailableSessionFromSocket(
key, std::move(connection), net_log, OK, is_secure);
// Failure is reported asynchronously.
- EXPECT_TRUE(spdy_session != NULL);
+ EXPECT_TRUE(spdy_session);
EXPECT_TRUE(HasSpdySession(http_session->spdy_session_pool(), key));
return spdy_session;
}
@@ -654,7 +655,7 @@ base::WeakPtr<SpdySession> CreateFakeSpdySessionHelper(
pool->CreateAvailableSessionFromSocket(
key, std::move(handle), BoundNetLog(), OK, true /* is_secure */);
// Failure is reported asynchronously.
- EXPECT_TRUE(spdy_session != NULL);
+ EXPECT_TRUE(spdy_session);
EXPECT_TRUE(HasSpdySession(pool, key));
return spdy_session;
}
« no previous file with comments | « net/spdy/spdy_stream_unittest.cc ('k') | remoting/protocol/fake_datagram_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698