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

Side by Side Diff: webrtc/base/ssladapter_unittest.cc

Issue 2883313003: Remove VirtualSocketServer's dependency on PhysicalSocketServer. (Closed)
Patch Set: Created 3 years, 7 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 | « webrtc/base/proxy_unittest.cc ('k') | webrtc/base/virtualsocket_unittest.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 /* 1 /*
2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 267
268 std::string data_; 268 std::string data_;
269 }; 269 };
270 270
271 class SSLAdapterTestBase : public testing::Test, 271 class SSLAdapterTestBase : public testing::Test,
272 public sigslot::has_slots<> { 272 public sigslot::has_slots<> {
273 public: 273 public:
274 explicit SSLAdapterTestBase(const rtc::SSLMode& ssl_mode, 274 explicit SSLAdapterTestBase(const rtc::SSLMode& ssl_mode,
275 const rtc::KeyParams& key_params) 275 const rtc::KeyParams& key_params)
276 : ssl_mode_(ssl_mode), 276 : ssl_mode_(ssl_mode),
277 vss_(new rtc::VirtualSocketServer(nullptr)), 277 vss_(new rtc::VirtualSocketServer()),
278 thread_(vss_.get()), 278 thread_(vss_.get()),
279 server_(new SSLAdapterTestDummyServer(ssl_mode_, key_params)), 279 server_(new SSLAdapterTestDummyServer(ssl_mode_, key_params)),
280 client_(new SSLAdapterTestDummyClient(ssl_mode_)), 280 client_(new SSLAdapterTestDummyClient(ssl_mode_)),
281 handshake_wait_(kTimeout) {} 281 handshake_wait_(kTimeout) {}
282 282
283 void SetHandshakeWait(int wait) { 283 void SetHandshakeWait(int wait) {
284 handshake_wait_ = wait; 284 handshake_wait_ = wait;
285 } 285 }
286 286
287 void TestHandshake(bool expect_success) { 287 void TestHandshake(bool expect_success) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 TEST_F(SSLAdapterTestDTLS_RSA, TestDTLSTransfer) { 411 TEST_F(SSLAdapterTestDTLS_RSA, TestDTLSTransfer) {
412 TestHandshake(true); 412 TestHandshake(true);
413 TestTransfer("Hello, world!"); 413 TestTransfer("Hello, world!");
414 } 414 }
415 415
416 // Test transfer between client and server, using ECDSA 416 // Test transfer between client and server, using ECDSA
417 TEST_F(SSLAdapterTestDTLS_ECDSA, TestDTLSTransfer) { 417 TEST_F(SSLAdapterTestDTLS_ECDSA, TestDTLSTransfer) {
418 TestHandshake(true); 418 TestHandshake(true);
419 TestTransfer("Hello, world!"); 419 TestTransfer("Hello, world!");
420 } 420 }
OLDNEW
« no previous file with comments | « webrtc/base/proxy_unittest.cc ('k') | webrtc/base/virtualsocket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698