Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1357)

Side by Side Diff: webrtc/api/statscollector_unittest.cc

Issue 2629563003: Added a new echo likelihood stat that reports the maximum value from a previous time period. (Closed)
Patch Set: Small bugfix. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2014 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 EXPECT_TRUE(GetValue( 407 EXPECT_TRUE(GetValue(
408 report, StatsReport::kStatsValueNameEchoReturnLossEnhancement, 408 report, StatsReport::kStatsValueNameEchoReturnLossEnhancement,
409 &value_in_report)); 409 &value_in_report));
410 EXPECT_EQ(rtc::ToString<int>(sinfo.echo_return_loss_enhancement), 410 EXPECT_EQ(rtc::ToString<int>(sinfo.echo_return_loss_enhancement),
411 value_in_report); 411 value_in_report);
412 EXPECT_TRUE(GetValue(report, 412 EXPECT_TRUE(GetValue(report,
413 StatsReport::kStatsValueNameResidualEchoLikelihood, 413 StatsReport::kStatsValueNameResidualEchoLikelihood,
414 &value_in_report)); 414 &value_in_report));
415 EXPECT_EQ(rtc::ToString<float>(sinfo.residual_echo_likelihood), 415 EXPECT_EQ(rtc::ToString<float>(sinfo.residual_echo_likelihood),
416 value_in_report); 416 value_in_report);
417 EXPECT_TRUE(GetValue(
418 report, StatsReport::kStatsValueNameResidualEchoLikelihoodRecentMax,
419 &value_in_report));
420 EXPECT_EQ(rtc::ToString<float>(sinfo.residual_echo_likelihood_recent_max),
421 value_in_report);
417 EXPECT_TRUE(GetValue(report, StatsReport::kStatsValueNameAudioInputLevel, 422 EXPECT_TRUE(GetValue(report, StatsReport::kStatsValueNameAudioInputLevel,
418 &value_in_report)); 423 &value_in_report));
419 EXPECT_EQ(rtc::ToString<int>(sinfo.audio_level), value_in_report); 424 EXPECT_EQ(rtc::ToString<int>(sinfo.audio_level), value_in_report);
420 EXPECT_TRUE(GetValue( 425 EXPECT_TRUE(GetValue(
421 report, StatsReport::kStatsValueNameTypingNoiseState, &value_in_report)); 426 report, StatsReport::kStatsValueNameTypingNoiseState, &value_in_report));
422 std::string typing_detected = sinfo.typing_noise_detected ? "true" : "false"; 427 std::string typing_detected = sinfo.typing_noise_detected ? "true" : "false";
423 EXPECT_EQ(typing_detected, value_in_report); 428 EXPECT_EQ(typing_detected, value_in_report);
424 } 429 }
425 430
426 // Helper methods to avoid duplication of code. 431 // Helper methods to avoid duplication of code.
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 EXPECT_CALL(*media_channel, GetStats(_)) 2022 EXPECT_CALL(*media_channel, GetStats(_))
2018 .WillOnce(DoAll(SetArgPointee<0>(stats_read), Return(true))); 2023 .WillOnce(DoAll(SetArgPointee<0>(stats_read), Return(true)));
2019 stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelStandard); 2024 stats.UpdateStats(PeerConnectionInterface::kStatsOutputLevelStandard);
2020 stats.GetStats(NULL, &reports); 2025 stats.GetStats(NULL, &reports);
2021 EXPECT_EQ(rtc::ToString(video_receiver_info.frames_decoded), 2026 EXPECT_EQ(rtc::ToString(video_receiver_info.frames_decoded),
2022 ExtractSsrcStatsValue(reports, 2027 ExtractSsrcStatsValue(reports,
2023 StatsReport::kStatsValueNameFramesDecoded)); 2028 StatsReport::kStatsValueNameFramesDecoded));
2024 } 2029 }
2025 2030
2026 } // namespace webrtc 2031 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698