Index: talk/app/webrtc/statscollector_unittest.cc |
diff --git a/talk/app/webrtc/statscollector_unittest.cc b/talk/app/webrtc/statscollector_unittest.cc |
index 9121c691b127c90647ba9f5b695d3a5b3c6352ad..eb2e3f3c41a1aad74d69381f5fbae277889fa30a 100644 |
--- a/talk/app/webrtc/statscollector_unittest.cc |
+++ b/talk/app/webrtc/statscollector_unittest.cc |
@@ -683,8 +683,8 @@ class StatsCollectorTest : public testing::Test { |
// Fake stats to process. |
cricket::TransportChannelStats channel_stats; |
channel_stats.component = 1; |
- channel_stats.srtp_cipher = "the-srtp-cipher"; |
- channel_stats.ssl_cipher = TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA; |
+ channel_stats.srtp_crypto_suite = rtc::SRTP_AES128_CM_SHA1_80; |
+ channel_stats.ssl_cipher_suite = TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA; |
cricket::TransportStats transport_stats; |
transport_stats.transport_name = "audio"; |
@@ -747,18 +747,17 @@ class StatsCollectorTest : public testing::Test { |
} |
// Check negotiated ciphers. |
- std::string dtls_cipher = ExtractStatsValue( |
- StatsReport::kStatsReportTypeComponent, |
- reports, |
- StatsReport::kStatsValueNameDtlsCipher); |
- EXPECT_EQ(rtc::SSLStreamAdapter::GetSslCipherSuiteName( |
+ std::string dtls_cipher_suite = |
+ ExtractStatsValue(StatsReport::kStatsReportTypeComponent, reports, |
+ StatsReport::kStatsValueNameDtlsCipher); |
+ EXPECT_EQ(rtc::SSLStreamAdapter::SslCipherSuiteToName( |
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA), |
- dtls_cipher); |
- std::string srtp_cipher = ExtractStatsValue( |
- StatsReport::kStatsReportTypeComponent, |
- reports, |
- StatsReport::kStatsValueNameSrtpCipher); |
- EXPECT_EQ("the-srtp-cipher", srtp_cipher); |
+ dtls_cipher_suite); |
+ std::string srtp_crypto_suite = |
+ ExtractStatsValue(StatsReport::kStatsReportTypeComponent, reports, |
+ StatsReport::kStatsValueNameSrtpCipher); |
+ EXPECT_EQ(rtc::SrtpCryptoSuiteToName(rtc::SRTP_AES128_CM_SHA1_80), |
+ srtp_crypto_suite); |
} |
cricket::FakeMediaEngine* media_engine_; |
@@ -1407,16 +1406,14 @@ TEST_F(StatsCollectorTest, NoTransport) { |
ASSERT_EQ(kNotFound, remote_certificate_id); |
// Check that the negotiated ciphers are absent. |
- std::string dtls_cipher = ExtractStatsValue( |
- StatsReport::kStatsReportTypeComponent, |
- reports, |
- StatsReport::kStatsValueNameDtlsCipher); |
- ASSERT_EQ(kNotFound, dtls_cipher); |
- std::string srtp_cipher = ExtractStatsValue( |
- StatsReport::kStatsReportTypeComponent, |
- reports, |
- StatsReport::kStatsValueNameSrtpCipher); |
- ASSERT_EQ(kNotFound, srtp_cipher); |
+ std::string dtls_cipher_suite = |
+ ExtractStatsValue(StatsReport::kStatsReportTypeComponent, reports, |
+ StatsReport::kStatsValueNameDtlsCipher); |
+ ASSERT_EQ(kNotFound, dtls_cipher_suite); |
+ std::string srtp_crypto_suite = |
+ ExtractStatsValue(StatsReport::kStatsReportTypeComponent, reports, |
+ StatsReport::kStatsValueNameSrtpCipher); |
+ ASSERT_EQ(kNotFound, srtp_crypto_suite); |
} |
// This test verifies that the stats are generated correctly when the transport |