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

Unified Diff: webrtc/modules/video_coding/video_coding_robustness_unittest.cc

Issue 2744013002: Updates to VCMDecodedFrameCallback, VideoReceiver and a few related classes/tests. (Closed)
Patch Set: Update DCHECKs Created 3 years, 9 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
« no previous file with comments | « webrtc/modules/video_coding/video_coding_impl.cc ('k') | webrtc/modules/video_coding/video_receiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/video_coding_robustness_unittest.cc
diff --git a/webrtc/modules/video_coding/video_coding_robustness_unittest.cc b/webrtc/modules/video_coding/video_coding_robustness_unittest.cc
index 55a05720c31137f76b07206fa6f60d2f2908cdd5..4c9c8302005f3562085715dc3708a69ecc67dd36 100644
--- a/webrtc/modules/video_coding/video_coding_robustness_unittest.cc
+++ b/webrtc/modules/video_coding/video_coding_robustness_unittest.cc
@@ -20,14 +20,15 @@
namespace webrtc {
-using ::testing::Return;
using ::testing::_;
-using ::testing::ElementsAre;
using ::testing::AllOf;
+using ::testing::AnyNumber;
using ::testing::Args;
+using ::testing::ElementsAre;
using ::testing::Field;
-using ::testing::Pointee;
using ::testing::NiceMock;
+using ::testing::Pointee;
+using ::testing::Return;
using ::testing::Sequence;
class VCMRobustnessTest : public ::testing::Test {
@@ -47,6 +48,13 @@ class VCMRobustnessTest : public ::testing::Test {
VideoCodingModule::Codec(kVideoCodecVP8, &video_codec_);
ASSERT_EQ(VCM_OK, vcm_->RegisterReceiveCodec(&video_codec_, 1));
vcm_->RegisterExternalDecoder(&decoder_, video_codec_.plType);
+
+ // Since we call Decode, we need to provide a valid receive callback.
+ // However, for the purposes of these tests, we ignore the callbacks.
+ EXPECT_CALL(receive_callback_, OnIncomingPayloadType(_)).Times(AnyNumber());
+ EXPECT_CALL(receive_callback_, OnDecoderImplementationName(_))
+ .Times(AnyNumber());
+ vcm_->RegisterReceiveCallback(&receive_callback_);
}
virtual void TearDown() { vcm_.reset(); }
@@ -72,6 +80,7 @@ class VCMRobustnessTest : public ::testing::Test {
}
std::unique_ptr<VideoCodingModule> vcm_;
+ MockVCMReceiveCallback receive_callback_;
VideoCodec video_codec_;
MockVCMFrameTypeCallback frame_type_callback_;
MockPacketRequestCallback request_callback_;
« no previous file with comments | « webrtc/modules/video_coding/video_coding_impl.cc ('k') | webrtc/modules/video_coding/video_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698