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

Unified Diff: content/renderer/media/video_track_recorder_unittest.cc

Issue 1313603004: MediaRecorderHandler (video part) and unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved DCHECK_EQ() Created 5 years, 3 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 | « content/renderer/media/video_track_recorder.cc ('k') | media/capture/webm_muxer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/video_track_recorder_unittest.cc
diff --git a/content/renderer/media/video_track_recorder_unittest.cc b/content/renderer/media/video_track_recorder_unittest.cc
index 34af5fc79db00fd1436d4fbecb0e564d17aee5c7..75ccc04ee282c8b28c79863dbcfab5395fa8a448 100644
--- a/content/renderer/media/video_track_recorder_unittest.cc
+++ b/content/renderer/media/video_track_recorder_unittest.cc
@@ -81,13 +81,13 @@ class VideoTrackRecorderTest : public testing::Test,
void Encode(const scoped_refptr<media::VideoFrame>& frame,
base::TimeTicks capture_time) {
EXPECT_TRUE(message_loop_.IsCurrent());
- video_track_recorder_->OnVideoFrame(frame, capture_time);
+ video_track_recorder_->OnVideoFrameForTesting(frame, capture_time);
}
// A ChildProcess and a MessageLoopForUI are both needed to fool the Tracks
// and Sources below into believing they are on the right threads.
const base::MessageLoopForUI message_loop_;
- ChildProcess child_process_;
+ const ChildProcess child_process_;
// All members are non-const due to the series of initialize() calls needed.
// |mock_source_| is owned by |blink_source_|, |track_| by |blink_track_|.
@@ -102,6 +102,10 @@ class VideoTrackRecorderTest : public testing::Test,
DISALLOW_COPY_AND_ASSIGN(VideoTrackRecorderTest);
};
+// Construct and destruct all objects, in particular |video_track_recorder_| and
+// its inner object(s). This is a non trivial sequence.
+TEST_F(VideoTrackRecorderTest, ConstructAndDestruct) {}
+
// Creates the encoder and encodes 2 frames of the same size; the encoder should
// be initialised and produce a keyframe, then a non-keyframe. Finally a frame
// of larger size is sent and is expected to be encoded as a keyframe.
« no previous file with comments | « content/renderer/media/video_track_recorder.cc ('k') | media/capture/webm_muxer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698