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

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

Issue 227083002: Revert 261966 "make SetReceiveBufferSize and SetSendBufferSize r..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « trunk/src/net/socket/ssl_server_socket_nss.cc ('k') | trunk/src/net/socket/tcp_client_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) 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 // 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 return incoming_->Read(buf, buf_len, callback); 171 return incoming_->Read(buf, buf_len, callback);
172 } 172 }
173 173
174 virtual int Write(IOBuffer* buf, int buf_len, 174 virtual int Write(IOBuffer* buf, int buf_len,
175 const CompletionCallback& callback) OVERRIDE { 175 const CompletionCallback& callback) OVERRIDE {
176 // Write random number of bytes. 176 // Write random number of bytes.
177 buf_len = rand() % buf_len + 1; 177 buf_len = rand() % buf_len + 1;
178 return outgoing_->Write(buf, buf_len, callback); 178 return outgoing_->Write(buf, buf_len, callback);
179 } 179 }
180 180
181 virtual int SetReceiveBufferSize(int32 size) OVERRIDE { 181 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE {
182 return net::OK; 182 return true;
183 } 183 }
184 184
185 virtual int SetSendBufferSize(int32 size) OVERRIDE { 185 virtual bool SetSendBufferSize(int32 size) OVERRIDE {
186 return net::OK; 186 return true;
187 } 187 }
188 188
189 virtual int Connect(const CompletionCallback& callback) OVERRIDE { 189 virtual int Connect(const CompletionCallback& callback) OVERRIDE {
190 return net::OK; 190 return net::OK;
191 } 191 }
192 192
193 virtual void Disconnect() OVERRIDE { 193 virtual void Disconnect() OVERRIDE {
194 incoming_->Close(); 194 incoming_->Close();
195 outgoing_->Close(); 195 outgoing_->Close();
196 } 196 }
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 unsigned char client_bad[kKeyingMaterialSize]; 576 unsigned char client_bad[kKeyingMaterialSize];
577 rv = client_socket_->ExportKeyingMaterial(kKeyingLabelBad, 577 rv = client_socket_->ExportKeyingMaterial(kKeyingLabelBad,
578 false, kKeyingContext, 578 false, kKeyingContext,
579 client_bad, sizeof(client_bad)); 579 client_bad, sizeof(client_bad));
580 ASSERT_EQ(rv, net::OK); 580 ASSERT_EQ(rv, net::OK);
581 EXPECT_NE(0, memcmp(server_out, client_bad, sizeof(server_out))); 581 EXPECT_NE(0, memcmp(server_out, client_bad, sizeof(server_out)));
582 } 582 }
583 #endif 583 #endif
584 584
585 } // namespace net 585 } // namespace net
OLDNEW
« no previous file with comments | « trunk/src/net/socket/ssl_server_socket_nss.cc ('k') | trunk/src/net/socket/tcp_client_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698