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

Unified Diff: webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc

Issue 2276913002: DecoderDatabase: Made several methods nonvirtual to minimize mockable interface (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Turned DecoderInfo factory into a raw pointer. Removed two unnecessary comments. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc
diff --git a/webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc b/webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc
index f9b9e7bc601d4b2319b05e236bbd0434d7ee0edd..f6caca34f054c50204c956f497e3f554cf51f578 100644
--- a/webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc
+++ b/webrtc/modules/audio_coding/neteq/neteq_impl_unittest.cc
@@ -269,24 +269,10 @@ TEST_F(NetEqImplTest, InsertPacket) {
*dec = std::move(mock_decoder);
}));
- DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu, "");
+ DecoderDatabase::DecoderInfo info(NetEqDecoder::kDecoderPCMu, "",
+ mock_decoder_factory);
// Expectations for decoder database.
- EXPECT_CALL(*mock_decoder_database_, IsRed(kPayloadType))
- .WillRepeatedly(Return(false)); // This is not RED.
- EXPECT_CALL(*mock_decoder_database_, CheckPayloadTypes(_))
- .Times(2)
- .WillRepeatedly(Return(DecoderDatabase::kOK)); // Payload type is valid.
- EXPECT_CALL(*mock_decoder_database_, IsDtmf(kPayloadType))
- .WillRepeatedly(Return(false)); // This is not DTMF.
- EXPECT_CALL(*mock_decoder_database_, GetDecoder(kPayloadType))
- .Times(3)
- .WillRepeatedly(
- Invoke([&info, mock_decoder_factory](uint8_t payload_type) {
- return info.GetDecoder(mock_decoder_factory);
- }));
- EXPECT_CALL(*mock_decoder_database_, IsComfortNoise(kPayloadType))
- .WillRepeatedly(Return(false)); // This is not CNG.
EXPECT_CALL(*mock_decoder_database_, GetDecoderInfo(kPayloadType))
.WillRepeatedly(Return(&info));

Powered by Google App Engine
This is Rietveld 408576698