| OLD | NEW |
| 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 Loading... |
| 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 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 } | 1054 } |
| 1055 | 1055 |
| 1056 INSTANTIATE_TEST_CASE_P(SSLStreamAdapterTestsTLS, | 1056 INSTANTIATE_TEST_CASE_P(SSLStreamAdapterTestsTLS, |
| 1057 SSLStreamAdapterTestTLS, | 1057 SSLStreamAdapterTestTLS, |
| 1058 Combine(Values(rtc::KT_RSA, rtc::KT_ECDSA), | 1058 Combine(Values(rtc::KT_RSA, rtc::KT_ECDSA), |
| 1059 Values(rtc::KT_RSA, rtc::KT_ECDSA))); | 1059 Values(rtc::KT_RSA, rtc::KT_ECDSA))); |
| 1060 INSTANTIATE_TEST_CASE_P(SSLStreamAdapterTestsDTLS, | 1060 INSTANTIATE_TEST_CASE_P(SSLStreamAdapterTestsDTLS, |
| 1061 SSLStreamAdapterTestDTLS, | 1061 SSLStreamAdapterTestDTLS, |
| 1062 Combine(Values(rtc::KT_RSA, rtc::KT_ECDSA), | 1062 Combine(Values(rtc::KT_RSA, rtc::KT_ECDSA), |
| 1063 Values(rtc::KT_RSA, rtc::KT_ECDSA))); | 1063 Values(rtc::KT_RSA, rtc::KT_ECDSA))); |
| OLD | NEW |