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

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

Issue 9958028: Add a new GetNegotiatedProtocol method to StreamSocket and implement in all subclasses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 8 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
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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 186 }
187 187
188 virtual int64 NumBytesRead() const OVERRIDE { 188 virtual int64 NumBytesRead() const OVERRIDE {
189 return -1; 189 return -1;
190 } 190 }
191 191
192 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE { 192 virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE {
193 return base::TimeDelta::FromMicroseconds(-1); 193 return base::TimeDelta::FromMicroseconds(-1);
194 } 194 }
195 195
196 virtual NextProto GetNegotiatedProtocol() const {
197 return kProtoUnknown;
198 }
199
196 private: 200 private:
197 net::BoundNetLog net_log_; 201 net::BoundNetLog net_log_;
198 FakeDataChannel* incoming_; 202 FakeDataChannel* incoming_;
199 FakeDataChannel* outgoing_; 203 FakeDataChannel* outgoing_;
200 204
201 DISALLOW_COPY_AND_ASSIGN(FakeSocket); 205 DISALLOW_COPY_AND_ASSIGN(FakeSocket);
202 }; 206 };
203 207
204 } // namespace 208 } // namespace
205 209
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 unsigned char client_bad[kKeyingMaterialSize]; 476 unsigned char client_bad[kKeyingMaterialSize];
473 rv = client_socket_->ExportKeyingMaterial(kKeyingLabelBad, 477 rv = client_socket_->ExportKeyingMaterial(kKeyingLabelBad,
474 false, kKeyingContext, 478 false, kKeyingContext,
475 client_bad, sizeof(client_bad)); 479 client_bad, sizeof(client_bad));
476 ASSERT_EQ(rv, net::OK); 480 ASSERT_EQ(rv, net::OK);
477 EXPECT_TRUE(memcmp(server_out, client_bad, sizeof(server_out)) != 0); 481 EXPECT_TRUE(memcmp(server_out, client_bad, sizeof(server_out)) != 0);
478 } 482 }
479 #endif 483 #endif
480 484
481 } // namespace net 485 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698