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

Unified Diff: content/browser/renderer_host/media/video_capture_controller_unittest.cc

Issue 760593003: Add PIXEL_FORMAT_NV12 into VideoPixelFormat (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
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());
« no previous file with comments | « content/browser/renderer_host/media/video_capture_controller.cc ('k') | media/video/capture/video_capture_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698