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 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1478 rtc::SSL_PROTOCOL_DTLS_10, rtc::KT_DEFAULT))); | 1478 rtc::SSL_PROTOCOL_DTLS_10, rtc::KT_DEFAULT))); |
1479 | 1479 |
1480 EXPECT_EQ_WAIT(rtc::SrtpCryptoSuiteToName(kDefaultSrtpCryptoSuite), | 1480 EXPECT_EQ_WAIT(rtc::SrtpCryptoSuiteToName(kDefaultSrtpCryptoSuite), |
1481 initializing_client()->GetSrtpCipherStats(), | 1481 initializing_client()->GetSrtpCipherStats(), |
1482 kMaxWaitForStatsMs); | 1482 kMaxWaitForStatsMs); |
1483 EXPECT_EQ(1, | 1483 EXPECT_EQ(1, |
1484 init_observer->GetEnumCounter(webrtc::kEnumCounterAudioSrtpCipher, | 1484 init_observer->GetEnumCounter(webrtc::kEnumCounterAudioSrtpCipher, |
1485 kDefaultSrtpCryptoSuite)); | 1485 kDefaultSrtpCryptoSuite)); |
1486 } | 1486 } |
1487 | 1487 |
1488 #if defined(MEMORY_SANITIZER) | |
1489 // Fails under MemorySanitizer: | |
1490 // See https://code.google.com/p/webrtc/issues/detail?id=5381. | |
1491 #define MAYBE_GetDtls12Both DISABLED_GetDtls12Both | |
1492 #else | |
1493 #define MAYBE_GetDtls12Both GetDtls12Both | |
1494 #endif | |
1495 // Test that DTLS 1.2 is used if both ends support it. | 1488 // Test that DTLS 1.2 is used if both ends support it. |
1496 TEST_F(P2PTestConductor, MAYBE_GetDtls12Both) { | 1489 TEST_F(P2PTestConductor, GetDtls12Both) { |
1497 PeerConnectionFactory::Options init_options; | 1490 PeerConnectionFactory::Options init_options; |
1498 init_options.ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12; | 1491 init_options.ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12; |
1499 PeerConnectionFactory::Options recv_options; | 1492 PeerConnectionFactory::Options recv_options; |
1500 recv_options.ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12; | 1493 recv_options.ssl_max_version = rtc::SSL_PROTOCOL_DTLS_12; |
1501 ASSERT_TRUE( | 1494 ASSERT_TRUE( |
1502 CreateTestClients(nullptr, &init_options, nullptr, &recv_options)); | 1495 CreateTestClients(nullptr, &init_options, nullptr, &recv_options)); |
1503 rtc::scoped_refptr<webrtc::FakeMetricsObserver> | 1496 rtc::scoped_refptr<webrtc::FakeMetricsObserver> |
1504 init_observer = new rtc::RefCountedObject<webrtc::FakeMetricsObserver>(); | 1497 init_observer = new rtc::RefCountedObject<webrtc::FakeMetricsObserver>(); |
1505 initializing_client()->pc()->RegisterUMAObserver(init_observer); | 1498 initializing_client()->pc()->RegisterUMAObserver(init_observer); |
1506 LocalP2PTest(); | 1499 LocalP2PTest(); |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2029 PeerConnectionInterface::IceServer server; | 2022 PeerConnectionInterface::IceServer server; |
2030 server.urls.push_back("turn:hostname"); | 2023 server.urls.push_back("turn:hostname"); |
2031 server.urls.push_back("turn:hostname2"); | 2024 server.urls.push_back("turn:hostname2"); |
2032 servers.push_back(server); | 2025 servers.push_back(server); |
2033 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_)); | 2026 EXPECT_TRUE(webrtc::ParseIceServers(servers, &stun_servers_, &turn_servers_)); |
2034 EXPECT_EQ(2U, turn_servers_.size()); | 2027 EXPECT_EQ(2U, turn_servers_.size()); |
2035 EXPECT_NE(turn_servers_[0].priority, turn_servers_[1].priority); | 2028 EXPECT_NE(turn_servers_[0].priority, turn_servers_[1].priority); |
2036 } | 2029 } |
2037 | 2030 |
2038 #endif // if !defined(THREAD_SANITIZER) | 2031 #endif // if !defined(THREAD_SANITIZER) |
OLD | NEW |