OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1481 rtc::SSL_PROTOCOL_DTLS_10, rtc::KT_DEFAULT))); | 1481 rtc::SSL_PROTOCOL_DTLS_10, rtc::KT_DEFAULT))); |
1482 | 1482 |
1483 EXPECT_EQ_WAIT(rtc::SrtpCryptoSuiteToName(kDefaultSrtpCryptoSuite), | 1483 EXPECT_EQ_WAIT(rtc::SrtpCryptoSuiteToName(kDefaultSrtpCryptoSuite), |
1484 initializing_client()->GetSrtpCipherStats(), | 1484 initializing_client()->GetSrtpCipherStats(), |
1485 kMaxWaitForStatsMs); | 1485 kMaxWaitForStatsMs); |
1486 EXPECT_EQ(1, | 1486 EXPECT_EQ(1, |
1487 init_observer->GetEnumCounter(webrtc::kEnumCounterAudioSrtpCipher, | 1487 init_observer->GetEnumCounter(webrtc::kEnumCounterAudioSrtpCipher, |
1488 kDefaultSrtpCryptoSuite)); | 1488 kDefaultSrtpCryptoSuite)); |
1489 } | 1489 } |
1490 | 1490 |
1491 #if defined(MEMORY_SANITIZER) | |
1492 // Fails under MemorySanitizer: | |
1493 // See https://code.google.com/p/webrtc/issues/detail?id=5381. | |
1494 #define MAYBE_GetDtls12Both DISABLED_GetDtls12Both | |
1495 #else | |
1496 #define MAYBE_GetDtls12Both GetDtls12Both | |
1497 #endif | |
1498 // Test that DTLS 1.2 is used if both ends support it. | 1491 // Test that DTLS 1.2 is used if both ends support it. |
1499 TEST_F(P2PTestConductor, MAYBE_GetDtls12Both) { | 1492 TEST_F(P2PTestConductor, GetDtls12Both) { |
1500 PeerConnectionFactory::Options init_options; | 1493 PeerConnectionFactory::Options init_options; |
1501 init_options.ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12; | 1494 init_options.ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12; |
1502 PeerConnectionFactory::Options recv_options; | 1495 PeerConnectionFactory::Options recv_options; |
1503 recv_options.ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12; | 1496 recv_options.ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12; |
1504 ASSERT_TRUE( | 1497 ASSERT_TRUE( |
1505 CreateTestClients(nullptr, &init_options, nullptr, &recv_options)); | 1498 CreateTestClients(nullptr, &init_options, nullptr, &recv_options)); |
1506 rtc::scoped_refptr<webrtc::FakeMetricsObserver> | 1499 rtc::scoped_refptr<webrtc::FakeMetricsObserver> |
1507 init_observer = new rtc::RefCountedObject<webrtc::FakeMetricsObserver>(); | 1500 init_observer = new rtc::RefCountedObject<webrtc::FakeMetricsObserver>(); |
1508 initializing_client()->pc()->RegisterUMAObserver(init_observer); | 1501 initializing_client()->pc()->RegisterUMAObserver(init_observer); |
1509 LocalP2PTest(); | 1502 LocalP2PTest(); |
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2019 server.urls.push_back("stun:hostname"); | 2012 server.urls.push_back("stun:hostname"); |
2020 server.urls.push_back("turn:hostname"); | 2013 server.urls.push_back("turn:hostname"); |
2021 servers.push_back(server); | 2014 servers.push_back(server); |
2022 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_configurations_, | 2015 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_configurations_, |
2023 &turn_configurations_)); | 2016 &turn_configurations_)); |
2024 EXPECT_EQ(1U, stun_configurations_.size()); | 2017 EXPECT_EQ(1U, stun_configurations_.size()); |
2025 EXPECT_EQ(1U, turn_configurations_.size()); | 2018 EXPECT_EQ(1U, turn_configurations_.size()); |
2026 } | 2019 } |
2027 | 2020 |
2028 #endif // if !defined(THREAD_SANITIZER) | 2021 #endif // if !defined(THREAD_SANITIZER) |
OLD | NEW |