Chromium Code Reviews| Index: webrtc/modules/audio_processing/test/debug_dump_test.cc |
| diff --git a/webrtc/modules/audio_processing/test/debug_dump_test.cc b/webrtc/modules/audio_processing/test/debug_dump_test.cc |
| index ffaf60984e1f7b24f438175b4a3bf26c77a79497..99301da4c5cd87a56b372f9116939b563b00a0f1 100644 |
| --- a/webrtc/modules/audio_processing/test/debug_dump_test.cc |
| +++ b/webrtc/modules/audio_processing/test/debug_dump_test.cc |
| @@ -379,6 +379,8 @@ TEST_F(DebugDumpTest, VerifyCombinedExperimentalStringInclusive) { |
| Config config; |
| config.Set<RefinedAdaptiveFilter>(new RefinedAdaptiveFilter(true)); |
| config.Set<EchoCanceller3>(new EchoCanceller3(true)); |
| + // Arbitrarily set clipping gain to 17, which will never be the dafault. |
|
peah-webrtc
2016/12/05 15:39:59
default
hlundin-webrtc
2016/12/05 15:48:20
Done.
|
| + config.Set<ExperimentalAgc>(new ExperimentalAgc(true, 0, 17)); |
| DebugDumpGenerator generator(config, AudioProcessing::Config()); |
| generator.StartRecording(); |
| generator.Process(100); |
| @@ -398,6 +400,8 @@ TEST_F(DebugDumpTest, VerifyCombinedExperimentalStringInclusive) { |
| msg->experiments_description().c_str()); |
| EXPECT_PRED_FORMAT2(testing::IsSubstring, "AEC3", |
| msg->experiments_description().c_str()); |
| + EXPECT_PRED_FORMAT2(testing::IsSubstring, "AgcClippingLevelExperiment", |
| + msg->experiments_description().c_str()); |
| } |
| } |
| } |
| @@ -424,6 +428,8 @@ TEST_F(DebugDumpTest, VerifyCombinedExperimentalStringExclusive) { |
| msg->experiments_description().c_str()); |
| EXPECT_PRED_FORMAT2(testing::IsNotSubstring, "AEC3", |
| msg->experiments_description().c_str()); |
| + EXPECT_PRED_FORMAT2(testing::IsNotSubstring, "AgcClippingLevelExperiment", |
| + msg->experiments_description().c_str()); |
| } |
| } |
| } |
| @@ -477,6 +483,31 @@ TEST_F(DebugDumpTest, VerifyLevelControllerExperimentalString) { |
| } |
| } |
| +TEST_F(DebugDumpTest, VerifyAgcClippingLevelExperimentalString) { |
| + Config config; |
| + // Arbitrarily set clipping gain to 17, which will never be the dafault. |
|
peah-webrtc
2016/12/05 15:40:00
default
hlundin-webrtc
2016/12/05 15:48:20
Done.
|
| + config.Set<ExperimentalAgc>(new ExperimentalAgc(true, 0, 17)); |
| + DebugDumpGenerator generator(config, AudioProcessing::Config()); |
| + generator.StartRecording(); |
| + generator.Process(100); |
| + generator.StopRecording(); |
| + |
| + DebugDumpReplayer debug_dump_replayer_; |
| + |
| + ASSERT_TRUE(debug_dump_replayer_.SetDumpFile(generator.dump_file_name())); |
| + |
| + while (const rtc::Optional<audioproc::Event> event = |
| + debug_dump_replayer_.GetNextEvent()) { |
| + debug_dump_replayer_.RunNextEvent(); |
| + if (event->type() == audioproc::Event::CONFIG) { |
| + const audioproc::Config* msg = &event->config(); |
| + ASSERT_TRUE(msg->has_experiments_description()); |
| + EXPECT_PRED_FORMAT2(testing::IsSubstring, "AgcClippingLevelExperiment", |
| + msg->experiments_description().c_str()); |
| + } |
| + } |
| +} |
| + |
| TEST_F(DebugDumpTest, VerifyEmptyExperimentalString) { |
| Config config; |
| DebugDumpGenerator generator(config, AudioProcessing::Config()); |