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

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

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 years, 2 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/sslstreamadapter.cc ('k') | webrtc/base/systeminfo.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 /* 1 /*
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2011 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } else { 327 } else {
328 EXPECT_TRUE_WAIT(client_ssl_->GetState() == rtc::SS_CLOSED, 328 EXPECT_TRUE_WAIT(client_ssl_->GetState() == rtc::SS_CLOSED,
329 handshake_wait_); 329 handshake_wait_);
330 } 330 }
331 } 331 }
332 332
333 rtc::StreamResult DataWritten(SSLDummyStream *from, const void *data, 333 rtc::StreamResult DataWritten(SSLDummyStream *from, const void *data,
334 size_t data_len, size_t *written, 334 size_t data_len, size_t *written,
335 int *error) { 335 int *error) {
336 // Randomly drop loss_ percent of packets 336 // Randomly drop loss_ percent of packets
337 if (rtc::CreateRandomId() % 100 < static_cast<uint32>(loss_)) { 337 if (rtc::CreateRandomId() % 100 < static_cast<uint32_t>(loss_)) {
338 LOG(LS_INFO) << "Randomly dropping packet, size=" << data_len; 338 LOG(LS_INFO) << "Randomly dropping packet, size=" << data_len;
339 *written = data_len; 339 *written = data_len;
340 return rtc::SR_SUCCESS; 340 return rtc::SR_SUCCESS;
341 } 341 }
342 if (dtls_ && (data_len > mtu_)) { 342 if (dtls_ && (data_len > mtu_)) {
343 LOG(LS_INFO) << "Dropping packet > mtu, size=" << data_len; 343 LOG(LS_INFO) << "Dropping packet > mtu, size=" << data_len;
344 *written = data_len; 344 *written = data_len;
345 return rtc::SR_SUCCESS; 345 return rtc::SR_SUCCESS;
346 } 346 }
347 347
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 } 1036 }
1037 1037
1038 INSTANTIATE_TEST_CASE_P(SSLStreamAdapterTestsTLS, 1038 INSTANTIATE_TEST_CASE_P(SSLStreamAdapterTestsTLS,
1039 SSLStreamAdapterTestTLS, 1039 SSLStreamAdapterTestTLS,
1040 Combine(Values(rtc::KT_RSA, rtc::KT_ECDSA), 1040 Combine(Values(rtc::KT_RSA, rtc::KT_ECDSA),
1041 Values(rtc::KT_RSA, rtc::KT_ECDSA))); 1041 Values(rtc::KT_RSA, rtc::KT_ECDSA)));
1042 INSTANTIATE_TEST_CASE_P(SSLStreamAdapterTestsDTLS, 1042 INSTANTIATE_TEST_CASE_P(SSLStreamAdapterTestsDTLS,
1043 SSLStreamAdapterTestDTLS, 1043 SSLStreamAdapterTestDTLS,
1044 Combine(Values(rtc::KT_RSA, rtc::KT_ECDSA), 1044 Combine(Values(rtc::KT_RSA, rtc::KT_ECDSA),
1045 Values(rtc::KT_RSA, rtc::KT_ECDSA))); 1045 Values(rtc::KT_RSA, rtc::KT_ECDSA)));
OLDNEW
« no previous file with comments | « webrtc/base/sslstreamadapter.cc ('k') | webrtc/base/systeminfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698