Index: content/browser/renderer_host/media/video_capture_controller_unittest.cc |
diff --git a/content/browser/renderer_host/media/video_capture_controller_unittest.cc b/content/browser/renderer_host/media/video_capture_controller_unittest.cc |
index 091a288285c9aeab9d18aa385c8f34566f277929..507542f0668274a08d4fed6614bd39018d1f4666 100644 |
--- a/content/browser/renderer_host/media/video_capture_controller_unittest.cc |
+++ b/content/browser/renderer_host/media/video_capture_controller_unittest.cc |
@@ -580,6 +580,16 @@ TEST_F(VideoCaptureControllerTest, ErrorBeforeDeviceCreation) { |
base::TimeTicks()); |
buffer = NULL; |
+ // Exercises the OnIncomingCapturedData() codepath when VideoPixelFormat |
+ // is PIXEL_FORMAT_NV12 |
+ device_->OnIncomingCapturedData( |
ostap
2014/12/03 18:45:44
I think you have to add other test, not insert cod
|
+ NULL, |
+ 0, |
+ media::VideoCaptureFormat( |
+ gfx::Size(320,240), 30, media::PIXEL_FORMAT_NV12), |
+ 0, |
+ base::TimeTicks()); |
+ |
base::RunLoop().RunUntilIdle(); |
} |
@@ -620,6 +630,14 @@ TEST_F(VideoCaptureControllerTest, ErrorAfterDeviceCreation) { |
base::TimeTicks()); |
buffer = NULL; |
+ device_->OnIncomingCapturedData( |
+ NULL, |
+ 0, |
+ media::VideoCaptureFormat( |
+ gfx::Size(320,240), 30, media::PIXEL_FORMAT_NV12), |
+ 0, |
+ base::TimeTicks()); |
+ |
EXPECT_CALL(*client_a_, DoError(route_id)).Times(1); |
base::RunLoop().RunUntilIdle(); |
Mock::VerifyAndClearExpectations(client_a_.get()); |