| Index: media/cast/sender/h264_vt_encoder_unittest.cc
|
| diff --git a/media/cast/sender/h264_vt_encoder_unittest.cc b/media/cast/sender/h264_vt_encoder_unittest.cc
|
| index 04f3d629da95b23a9d9f8786347b5eb691ddacfd..4be1b93c7606b9d309b22957c961c6a484e0404b 100644
|
| --- a/media/cast/sender/h264_vt_encoder_unittest.cc
|
| +++ b/media/cast/sender/h264_vt_encoder_unittest.cc
|
| @@ -208,8 +208,6 @@ class H264VideoToolboxEncoderTest : public ::testing::Test {
|
| encoder_.reset(new H264VideoToolboxEncoder(
|
| cast_environment_,
|
| video_sender_config_,
|
| - gfx::Size(kVideoWidth, kVideoHeight),
|
| - 0u,
|
| base::Bind(&SaveOperationalStatus, &operational_status_)));
|
| message_loop_.RunUntilIdle();
|
| EXPECT_EQ(STATUS_INITIALIZED, operational_status_);
|
| @@ -306,10 +304,12 @@ TEST_F(H264VideoToolboxEncoderTest, CheckFramesAreDecodable) {
|
| TEST_F(H264VideoToolboxEncoderTest, CheckVideoFrameFactory) {
|
| auto video_frame_factory = encoder_->CreateVideoFrameFactory();
|
| ASSERT_TRUE(video_frame_factory.get());
|
| - CreateFrameAndMemsetPlane(video_frame_factory.get());
|
| - // TODO(jfroy): Need to test that the encoder can encode VideoFrames provided
|
| - // by the VideoFrameFactory.
|
| - encoder_.reset();
|
| + // The first call to |MaybeCreateFrame| will return null but post a task to
|
| + // the encoder to initialize for the specified frame size. We then drain the
|
| + // message loop. After that, the encoder should have initialized and we
|
| + // request a frame again.
|
| + ASSERT_FALSE(video_frame_factory->MaybeCreateFrame(
|
| + gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta()));
|
| message_loop_.RunUntilIdle();
|
| CreateFrameAndMemsetPlane(video_frame_factory.get());
|
| }
|
|
|