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

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

Issue 8801004: base::Bind: Convert StreamSocket::Connect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « net/socket/ssl_server_socket_nss.cc ('k') | net/socket/stream_socket.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // This test suite uses SSLClientSocket to test the implementation of 5 // This test suite uses SSLClientSocket to test the implementation of
6 // SSLServerSocket. In order to establish connections between the sockets 6 // SSLServerSocket. In order to establish connections between the sockets
7 // we need two additional classes: 7 // we need two additional classes:
8 // 1. FakeSocket 8 // 1. FakeSocket
9 // Connects SSL socket to FakeDataChannel. This class is just a stub. 9 // Connects SSL socket to FakeDataChannel. This class is just a stub.
10 // 10 //
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 return true; 140 return true;
141 } 141 }
142 142
143 virtual bool SetSendBufferSize(int32 size) { 143 virtual bool SetSendBufferSize(int32 size) {
144 return true; 144 return true;
145 } 145 }
146 146
147 virtual int Connect(OldCompletionCallback* callback) { 147 virtual int Connect(OldCompletionCallback* callback) {
148 return net::OK; 148 return net::OK;
149 } 149 }
150 virtual int Connect(const CompletionCallback& callback) {
151 return net::OK;
152 }
150 153
151 virtual void Disconnect() {} 154 virtual void Disconnect() {}
152 155
153 virtual bool IsConnected() const { 156 virtual bool IsConnected() const {
154 return true; 157 return true;
155 } 158 }
156 159
157 virtual bool IsConnectedAndIdle() const { 160 virtual bool IsConnectedAndIdle() const {
158 return true; 161 return true;
159 } 162 }
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 const char* kKeyingLabelBad = "EXPERIMENTAL-server-socket-test-bad"; 471 const char* kKeyingLabelBad = "EXPERIMENTAL-server-socket-test-bad";
469 unsigned char client_bad[kKeyingMaterialSize]; 472 unsigned char client_bad[kKeyingMaterialSize];
470 rv = client_socket_->ExportKeyingMaterial(kKeyingLabelBad, kKeyingContext, 473 rv = client_socket_->ExportKeyingMaterial(kKeyingLabelBad, kKeyingContext,
471 client_bad, sizeof(client_bad)); 474 client_bad, sizeof(client_bad));
472 ASSERT_EQ(rv, net::OK); 475 ASSERT_EQ(rv, net::OK);
473 EXPECT_TRUE(memcmp(server_out, client_bad, sizeof(server_out)) != 0); 476 EXPECT_TRUE(memcmp(server_out, client_bad, sizeof(server_out)) != 0);
474 } 477 }
475 #endif 478 #endif
476 479
477 } // namespace net 480 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_server_socket_nss.cc ('k') | net/socket/stream_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698