Index: talk/app/webrtc/peerconnection_unittest.cc |
diff --git a/talk/app/webrtc/peerconnection_unittest.cc b/talk/app/webrtc/peerconnection_unittest.cc |
index d593f888ff8add8910fa5c6829d720978733da52..c077fe003f322b5b1ca846bfe2bb2edcd5dee244 100644 |
--- a/talk/app/webrtc/peerconnection_unittest.cc |
+++ b/talk/app/webrtc/peerconnection_unittest.cc |
@@ -1342,22 +1342,21 @@ |
initializing_client()->pc()->RegisterUMAObserver(init_observer); |
LocalP2PTest(); |
- EXPECT_EQ_WAIT(rtc::SSLStreamAdapter::GetSslCipherSuiteName( |
- rtc::SSLStreamAdapter::GetDefaultSslCipherForTest( |
- rtc::SSL_PROTOCOL_DTLS_10, rtc::KT_DEFAULT)), |
- initializing_client()->GetDtlsCipherStats(), |
- kMaxWaitForStatsMs); |
- EXPECT_EQ(1, init_observer->GetEnumCounter( |
- webrtc::kEnumCounterAudioSslCipher, |
- rtc::SSLStreamAdapter::GetDefaultSslCipherForTest( |
- rtc::SSL_PROTOCOL_DTLS_10, rtc::KT_DEFAULT))); |
- |
- EXPECT_EQ_WAIT(kDefaultSrtpCipher, |
- initializing_client()->GetSrtpCipherStats(), |
- kMaxWaitForStatsMs); |
- EXPECT_EQ(1, init_observer->GetEnumCounter( |
- webrtc::kEnumCounterAudioSrtpCipher, |
- rtc::GetSrtpCryptoSuiteFromName(kDefaultSrtpCipher))); |
+ EXPECT_EQ_WAIT( |
+ rtc::SSLStreamAdapter::GetDefaultSslCipher(rtc::SSL_PROTOCOL_DTLS_10), |
+ initializing_client()->GetDtlsCipherStats(), |
+ kMaxWaitForStatsMs); |
+ EXPECT_EQ( |
+ rtc::SSLStreamAdapter::GetDefaultSslCipher(rtc::SSL_PROTOCOL_DTLS_10), |
+ init_observer->GetStringHistogramSample(webrtc::kAudioSslCipher)); |
+ |
+ EXPECT_EQ_WAIT( |
+ kDefaultSrtpCipher, |
+ initializing_client()->GetSrtpCipherStats(), |
+ kMaxWaitForStatsMs); |
+ EXPECT_EQ( |
+ kDefaultSrtpCipher, |
+ init_observer->GetStringHistogramSample(webrtc::kAudioSrtpCipher)); |
} |
// Test that DTLS 1.2 is used if both ends support it. |
@@ -1372,22 +1371,21 @@ |
initializing_client()->pc()->RegisterUMAObserver(init_observer); |
LocalP2PTest(); |
- EXPECT_EQ_WAIT(rtc::SSLStreamAdapter::GetSslCipherSuiteName( |
- rtc::SSLStreamAdapter::GetDefaultSslCipherForTest( |
- rtc::SSL_PROTOCOL_DTLS_12, rtc::KT_DEFAULT)), |
- initializing_client()->GetDtlsCipherStats(), |
- kMaxWaitForStatsMs); |
- EXPECT_EQ(1, init_observer->GetEnumCounter( |
- webrtc::kEnumCounterAudioSslCipher, |
- rtc::SSLStreamAdapter::GetDefaultSslCipherForTest( |
- rtc::SSL_PROTOCOL_DTLS_12, rtc::KT_DEFAULT))); |
- |
- EXPECT_EQ_WAIT(kDefaultSrtpCipher, |
- initializing_client()->GetSrtpCipherStats(), |
- kMaxWaitForStatsMs); |
- EXPECT_EQ(1, init_observer->GetEnumCounter( |
- webrtc::kEnumCounterAudioSrtpCipher, |
- rtc::GetSrtpCryptoSuiteFromName(kDefaultSrtpCipher))); |
+ EXPECT_EQ_WAIT( |
+ rtc::SSLStreamAdapter::GetDefaultSslCipher(rtc::SSL_PROTOCOL_DTLS_12), |
+ initializing_client()->GetDtlsCipherStats(), |
+ kMaxWaitForStatsMs); |
+ EXPECT_EQ( |
+ rtc::SSLStreamAdapter::GetDefaultSslCipher(rtc::SSL_PROTOCOL_DTLS_12), |
+ init_observer->GetStringHistogramSample(webrtc::kAudioSslCipher)); |
+ |
+ EXPECT_EQ_WAIT( |
+ kDefaultSrtpCipher, |
+ initializing_client()->GetSrtpCipherStats(), |
+ kMaxWaitForStatsMs); |
+ EXPECT_EQ( |
+ kDefaultSrtpCipher, |
+ init_observer->GetStringHistogramSample(webrtc::kAudioSrtpCipher)); |
} |
// Test that DTLS 1.0 is used if the initator supports DTLS 1.2 and the |
@@ -1403,22 +1401,21 @@ |
initializing_client()->pc()->RegisterUMAObserver(init_observer); |
LocalP2PTest(); |
- EXPECT_EQ_WAIT(rtc::SSLStreamAdapter::GetSslCipherSuiteName( |
- rtc::SSLStreamAdapter::GetDefaultSslCipherForTest( |
- rtc::SSL_PROTOCOL_DTLS_10, rtc::KT_DEFAULT)), |
- initializing_client()->GetDtlsCipherStats(), |
- kMaxWaitForStatsMs); |
- EXPECT_EQ(1, init_observer->GetEnumCounter( |
- webrtc::kEnumCounterAudioSslCipher, |
- rtc::SSLStreamAdapter::GetDefaultSslCipherForTest( |
- rtc::SSL_PROTOCOL_DTLS_10, rtc::KT_DEFAULT))); |
- |
- EXPECT_EQ_WAIT(kDefaultSrtpCipher, |
- initializing_client()->GetSrtpCipherStats(), |
- kMaxWaitForStatsMs); |
- EXPECT_EQ(1, init_observer->GetEnumCounter( |
- webrtc::kEnumCounterAudioSrtpCipher, |
- rtc::GetSrtpCryptoSuiteFromName(kDefaultSrtpCipher))); |
+ EXPECT_EQ_WAIT( |
+ rtc::SSLStreamAdapter::GetDefaultSslCipher(rtc::SSL_PROTOCOL_DTLS_10), |
+ initializing_client()->GetDtlsCipherStats(), |
+ kMaxWaitForStatsMs); |
+ EXPECT_EQ( |
+ rtc::SSLStreamAdapter::GetDefaultSslCipher(rtc::SSL_PROTOCOL_DTLS_10), |
+ init_observer->GetStringHistogramSample(webrtc::kAudioSslCipher)); |
+ |
+ EXPECT_EQ_WAIT( |
+ kDefaultSrtpCipher, |
+ initializing_client()->GetSrtpCipherStats(), |
+ kMaxWaitForStatsMs); |
+ EXPECT_EQ( |
+ kDefaultSrtpCipher, |
+ init_observer->GetStringHistogramSample(webrtc::kAudioSrtpCipher)); |
} |
// Test that DTLS 1.0 is used if the initator supports DTLS 1.0 and the |
@@ -1434,22 +1431,21 @@ |
initializing_client()->pc()->RegisterUMAObserver(init_observer); |
LocalP2PTest(); |
- EXPECT_EQ_WAIT(rtc::SSLStreamAdapter::GetSslCipherSuiteName( |
- rtc::SSLStreamAdapter::GetDefaultSslCipherForTest( |
- rtc::SSL_PROTOCOL_DTLS_10, rtc::KT_DEFAULT)), |
- initializing_client()->GetDtlsCipherStats(), |
- kMaxWaitForStatsMs); |
- EXPECT_EQ(1, init_observer->GetEnumCounter( |
- webrtc::kEnumCounterAudioSslCipher, |
- rtc::SSLStreamAdapter::GetDefaultSslCipherForTest( |
- rtc::SSL_PROTOCOL_DTLS_10, rtc::KT_DEFAULT))); |
- |
- EXPECT_EQ_WAIT(kDefaultSrtpCipher, |
- initializing_client()->GetSrtpCipherStats(), |
- kMaxWaitForStatsMs); |
- EXPECT_EQ(1, init_observer->GetEnumCounter( |
- webrtc::kEnumCounterAudioSrtpCipher, |
- rtc::GetSrtpCryptoSuiteFromName(kDefaultSrtpCipher))); |
+ EXPECT_EQ_WAIT( |
+ rtc::SSLStreamAdapter::GetDefaultSslCipher(rtc::SSL_PROTOCOL_DTLS_10), |
+ initializing_client()->GetDtlsCipherStats(), |
+ kMaxWaitForStatsMs); |
+ EXPECT_EQ( |
+ rtc::SSLStreamAdapter::GetDefaultSslCipher(rtc::SSL_PROTOCOL_DTLS_10), |
+ init_observer->GetStringHistogramSample(webrtc::kAudioSslCipher)); |
+ |
+ EXPECT_EQ_WAIT( |
+ kDefaultSrtpCipher, |
+ initializing_client()->GetSrtpCipherStats(), |
+ kMaxWaitForStatsMs); |
+ EXPECT_EQ( |
+ kDefaultSrtpCipher, |
+ init_observer->GetStringHistogramSample(webrtc::kAudioSrtpCipher)); |
} |
// This test sets up a call between two parties with audio, video and data. |