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

Side by Side Diff: net/socket/ssl_client_socket_unittest.cc

Issue 1059843002: Refactor NetLog::LogLevel --> NetLogCaptureMode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again to fix a merge conflict 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 unified diff | Download patch
« no previous file with comments | « net/socket/socket_net_log_params.cc ('k') | net/socket/transport_client_socket_pool.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/socket/ssl_client_socket.h" 5 #include "net/socket/ssl_client_socket.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 2088 matching lines...) Expand 10 before | Expand all | Expand 10 after
2099 SpawnedTestServer test_server(SpawnedTestServer::TYPE_HTTPS, 2099 SpawnedTestServer test_server(SpawnedTestServer::TYPE_HTTPS,
2100 SpawnedTestServer::kLocalhost, 2100 SpawnedTestServer::kLocalhost,
2101 base::FilePath()); 2101 base::FilePath());
2102 ASSERT_TRUE(test_server.Start()); 2102 ASSERT_TRUE(test_server.Start());
2103 2103
2104 AddressList addr; 2104 AddressList addr;
2105 ASSERT_TRUE(test_server.GetAddressList(&addr)); 2105 ASSERT_TRUE(test_server.GetAddressList(&addr));
2106 2106
2107 TestCompletionCallback callback; 2107 TestCompletionCallback callback;
2108 TestNetLog log; 2108 TestNetLog log;
2109 log.SetLogLevel(NetLog::LOG_ALL); 2109 log.SetCaptureMode(NetLogCaptureMode::IncludeSocketBytes());
2110 scoped_ptr<StreamSocket> transport( 2110 scoped_ptr<StreamSocket> transport(
2111 new TCPClientSocket(addr, &log, NetLog::Source())); 2111 new TCPClientSocket(addr, &log, NetLog::Source()));
2112 int rv = transport->Connect(callback.callback()); 2112 int rv = transport->Connect(callback.callback());
2113 if (rv == ERR_IO_PENDING) 2113 if (rv == ERR_IO_PENDING)
2114 rv = callback.WaitForResult(); 2114 rv = callback.WaitForResult();
2115 EXPECT_EQ(OK, rv); 2115 EXPECT_EQ(OK, rv);
2116 2116
2117 scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket( 2117 scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket(
2118 transport.Pass(), test_server.host_port_pair(), SSLConfig())); 2118 transport.Pass(), test_server.host_port_pair(), SSLConfig()));
2119 2119
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
3431 ssl_config.channel_id_enabled = true; 3431 ssl_config.channel_id_enabled = true;
3432 3432
3433 int rv; 3433 int rv;
3434 ASSERT_TRUE(CreateAndConnectSSLClientSocket(ssl_config, &rv)); 3434 ASSERT_TRUE(CreateAndConnectSSLClientSocket(ssl_config, &rv));
3435 3435
3436 EXPECT_EQ(ERR_UNEXPECTED, rv); 3436 EXPECT_EQ(ERR_UNEXPECTED, rv);
3437 EXPECT_FALSE(sock_->IsConnected()); 3437 EXPECT_FALSE(sock_->IsConnected());
3438 } 3438 }
3439 3439
3440 } // namespace net 3440 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/socket_net_log_params.cc ('k') | net/socket/transport_client_socket_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698