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

Unified Diff: net/socket/ssl_client_socket_unittest.cc

Issue 1109473003: Get rid of TestNetLog::CapturedEntry[List] typedefs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/socket/ssl_client_socket_unittest.cc
diff --git a/net/socket/ssl_client_socket_unittest.cc b/net/socket/ssl_client_socket_unittest.cc
index 9267abd5eda963a1b7afdcde9646b5cd95a18f1f..81b34307bc30c0e7a57f8ff5ddf771cba11dcdd2 100644
--- a/net/socket/ssl_client_socket_unittest.cc
+++ b/net/socket/ssl_client_socket_unittest.cc
@@ -19,8 +19,10 @@
#include "net/cert/test_root_certs.h"
#include "net/dns/host_resolver.h"
#include "net/http/transport_security_state.h"
+#include "net/log/captured_net_log_entry.h"
#include "net/log/net_log.h"
#include "net/log/net_log_unittest.h"
+#include "net/log/test_net_log.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/client_socket_handle.h"
#include "net/socket/socket_test_util.h"
@@ -969,9 +971,8 @@ class SSLClientSocketChannelIDTest : public SSLClientSocketTest {
// they'll give up waiting for application data and send the Finished after a
// timeout. This means that an SSL connect end event may appear as a socket
// write.
-static bool LogContainsSSLConnectEndEvent(
- const TestNetLog::CapturedEntryList& log,
- int i) {
+static bool LogContainsSSLConnectEndEvent(const CapturedNetLogEntry::List& log,
+ int i) {
return LogContainsEndEvent(log, i, NetLog::TYPE_SSL_CONNECT) ||
LogContainsEvent(
log, i, NetLog::TYPE_SOCKET_BYTES_SENT, NetLog::PHASE_NONE);
@@ -1014,7 +1015,7 @@ TEST_F(SSLClientSocketTest, Connect) {
rv = sock->Connect(callback.callback());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(entries, 5, NetLog::TYPE_SSL_CONNECT));
if (rv == ERR_IO_PENDING)
@@ -1056,7 +1057,7 @@ TEST_F(SSLClientSocketTest, ConnectExpired) {
rv = sock->Connect(callback.callback());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(entries, 5, NetLog::TYPE_SSL_CONNECT));
if (rv == ERR_IO_PENDING)
@@ -1100,7 +1101,7 @@ TEST_F(SSLClientSocketTest, ConnectMismatched) {
rv = sock->Connect(callback.callback());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(entries, 5, NetLog::TYPE_SSL_CONNECT));
if (rv == ERR_IO_PENDING)
@@ -1144,7 +1145,7 @@ TEST_F(SSLClientSocketTest, ConnectClientAuthCertRequested) {
rv = sock->Connect(callback.callback());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(entries, 5, NetLog::TYPE_SSL_CONNECT));
if (rv == ERR_IO_PENDING)
@@ -1209,7 +1210,7 @@ TEST_F(SSLClientSocketTest, ConnectClientAuthSendNullCert) {
// TODO(davidben): Add a test which requires them and verify the error.
rv = sock->Connect(callback.callback());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(entries, 5, NetLog::TYPE_SSL_CONNECT));
if (rv == ERR_IO_PENDING)
@@ -2136,7 +2137,7 @@ TEST_F(SSLClientSocketTest, Read_FullLogging) {
rv = callback.WaitForResult();
EXPECT_EQ(static_cast<int>(arraysize(request_text) - 1), rv);
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
size_t last_index = ExpectLogContainsSomewhereAfter(
entries, 5, NetLog::TYPE_SSL_SOCKET_BYTES_SENT, NetLog::PHASE_NONE);
@@ -2248,7 +2249,7 @@ TEST_F(SSLClientSocketTest, CipherSuiteDisables) {
EXPECT_FALSE(sock->IsConnected());
rv = sock->Connect(callback.callback());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(entries, 5, NetLog::TYPE_SSL_CONNECT));
@@ -2542,7 +2543,7 @@ TEST_F(SSLClientSocketTest, VerifyReturnChainProperlyOrdered) {
EXPECT_FALSE(sock->IsConnected());
rv = sock->Connect(callback.callback());
- TestNetLog::CapturedEntryList entries;
+ CapturedNetLogEntry::List entries;
log.GetEntries(&entries);
EXPECT_TRUE(LogContainsBeginEvent(entries, 5, NetLog::TYPE_SSL_CONNECT));
if (rv == ERR_IO_PENDING)

Powered by Google App Engine
This is Rietveld 408576698