diff options
Diffstat (limited to 'chromium/third_party/webrtc/video_engine/encoder_state_feedback_unittest.cc')
-rw-r--r-- | chromium/third_party/webrtc/video_engine/encoder_state_feedback_unittest.cc | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/chromium/third_party/webrtc/video_engine/encoder_state_feedback_unittest.cc b/chromium/third_party/webrtc/video_engine/encoder_state_feedback_unittest.cc index 7f331659123..4e15752fdec 100644 --- a/chromium/third_party/webrtc/video_engine/encoder_state_feedback_unittest.cc +++ b/chromium/third_party/webrtc/video_engine/encoder_state_feedback_unittest.cc @@ -17,26 +17,17 @@ #include "webrtc/common.h" #include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h" -#include "webrtc/modules/utility/interface/process_thread.h" +#include "webrtc/modules/utility/interface/mock/mock_process_thread.h" #include "webrtc/system_wrappers/interface/scoped_ptr.h" #include "webrtc/video_engine/vie_encoder.h" -namespace webrtc { +using ::testing::NiceMock; -// TODO(mflodman) Create a common mock in module utility. -class TestProcessThread : public ProcessThread { - public: - TestProcessThread() {} - ~TestProcessThread() {} - virtual int32_t Start() { return 0; } - virtual int32_t Stop() { return 0; } - virtual int32_t RegisterModule(const Module* module) { return 0; } - virtual int32_t DeRegisterModule(const Module* module) { return 0; } -}; +namespace webrtc { class MockVieEncoder : public ViEEncoder { public: - explicit MockVieEncoder(TestProcessThread* process_thread) + explicit MockVieEncoder(ProcessThread* process_thread) : ViEEncoder(1, 1, 1, config_, *process_thread, NULL) {} ~MockVieEncoder() {} @@ -55,10 +46,10 @@ class MockVieEncoder : public ViEEncoder { class VieKeyRequestTest : public ::testing::Test { protected: virtual void SetUp() { - process_thread_.reset(new TestProcessThread()); + process_thread_.reset(new NiceMock<MockProcessThread>); encoder_state_feedback_.reset(new EncoderStateFeedback()); } - scoped_ptr<TestProcessThread> process_thread_; + scoped_ptr<MockProcessThread> process_thread_; scoped_ptr<EncoderStateFeedback> encoder_state_feedback_; }; |