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

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

Issue 68503005: Reorganize media::VideoCapture* types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: a7375761 Rebase. Created 7 years, 1 month 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 db90c467791d0739d686c980792957f14cd6c937..55a649c0c85ffd2abba20f1f2ad44035eee5dfa7 100644
--- a/content/browser/renderer_host/media/video_capture_controller_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_controller_unittest.cc
@@ -115,8 +115,7 @@ TEST_F(VideoCaptureControllerTest, AddAndRemoveClients) {
media::VideoCaptureParams session_100;
session_100.session_id = 100;
session_100.requested_format = media::VideoCaptureFormat(
- 320, 240, 30, media::ConstantResolutionVideoCaptureDevice);
-
+ gfx::Size(320, 240), 30, media::PIXEL_FORMAT_I420);
media::VideoCaptureParams session_200 = session_100;
session_200.session_id = 200;
@@ -209,7 +208,7 @@ TEST_F(VideoCaptureControllerTest, NormalCaptureMultipleClients) {
media::VideoCaptureParams session_100;
session_100.session_id = 100;
session_100.requested_format = media::VideoCaptureFormat(
- 320, 240, 30, media::ConstantResolutionVideoCaptureDevice);
+ gfx::Size(320, 240), 30, media::PIXEL_FORMAT_I420);
media::VideoCaptureParams session_200 = session_100;
session_200.session_id = 200;
@@ -224,9 +223,8 @@ TEST_F(VideoCaptureControllerTest, NormalCaptureMultipleClients) {
// The device format needn't match the VideoCaptureParams (the camera can do
// what it wants). Pick something random.
- media::VideoCaptureCapability device_format(
- 10, 10, 25, media::PIXEL_FORMAT_RGB24,
- media::ConstantResolutionVideoCaptureDevice);
+ media::VideoCaptureFormat device_format(
+ gfx::Size(10, 10), 25, media::PIXEL_FORMAT_RGB24);
const VideoCaptureControllerID client_a_route_1(0xa1a1a1a1);
const VideoCaptureControllerID client_a_route_2(0xa2a2a2a2);
@@ -383,7 +381,7 @@ TEST_F(VideoCaptureControllerTest, ErrorBeforeDeviceCreation) {
media::VideoCaptureParams session_100;
session_100.session_id = 100;
session_100.requested_format = media::VideoCaptureFormat(
- 320, 240, 30, media::ConstantResolutionVideoCaptureDevice);
+ gfx::Size(320, 240), 30, media::PIXEL_FORMAT_I420);
media::VideoCaptureParams session_200 = session_100;
session_200.session_id = 200;
@@ -425,7 +423,7 @@ TEST_F(VideoCaptureControllerTest, ErrorAfterDeviceCreation) {
media::VideoCaptureParams session_100;
session_100.session_id = 100;
session_100.requested_format = media::VideoCaptureFormat(
- 320, 240, 30, media::ConstantResolutionVideoCaptureDevice);
+ gfx::Size(320, 240), 30, media::PIXEL_FORMAT_I420);
media::VideoCaptureParams session_200 = session_100;
session_200.session_id = 200;
@@ -435,10 +433,8 @@ TEST_F(VideoCaptureControllerTest, ErrorAfterDeviceCreation) {
// Start with one client.
controller_->AddClient(route_id, client_a_.get(),
base::kNullProcessHandle, session_100);
- // OnFrameInfo from the VCD should become a no-op after the error occurs.
- media::VideoCaptureCapability device_format(
- 10, 10, 25, media::PIXEL_FORMAT_ARGB,
- media::ConstantResolutionVideoCaptureDevice);
+ media::VideoCaptureFormat device_format(
+ gfx::Size(10, 10), 25, media::PIXEL_FORMAT_ARGB);
// Start the device. Then, before the first buffer, signal an error and
// deliver the buffer. The error should be propagated to clients; the buffer

Powered by Google App Engine
This is Rietveld 408576698