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

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

Issue 83633008: Reland: Reorganize media::VideoCapture* types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_host_unittest.cc
diff --git a/content/browser/renderer_host/media/video_capture_host_unittest.cc b/content/browser/renderer_host/media/video_capture_host_unittest.cc
index cdb465b699064ee098782634734146574967946c..43a9d8d4a89cc4834d2cdfffa1ca77d4f8d446d9 100644
--- a/content/browser/renderer_host/media/video_capture_host_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_host_unittest.cc
@@ -199,13 +199,14 @@ class MockVideoCaptureHost : public VideoCaptureHost {
ASSERT_TRUE(dib != NULL);
if (dump_video_) {
if (!format_.IsValid()) {
- dumper_.StartDump(frame_format.width, frame_format.height);
+ dumper_.StartDump(frame_format.frame_size.width(),
+ frame_format.frame_size.height());
format_ = frame_format;
}
- ASSERT_EQ(format_.width, frame_format.width)
+ ASSERT_EQ(format_.frame_size.width(), frame_format.frame_size.width())
+ << "Dump format does not handle variable resolution.";
+ ASSERT_EQ(format_.frame_size.height(), frame_format.frame_size.height())
<< "Dump format does not handle variable resolution.";
- ASSERT_EQ(format_.height, frame_format.height)
- << "Dump format does not handle variable resolution.";;
dumper_.NewVideoFrame(dib->memory());
}
@@ -347,9 +348,8 @@ class VideoCaptureHostTest : public testing::Test {
media::VideoCaptureParams params;
params.requested_format = media::VideoCaptureFormat(
- 352, 288, 30, media::ConstantResolutionVideoCaptureDevice);
- params.session_id = opened_session_id_;
- host_->OnStartCapture(kDeviceId, params);
+ gfx::Size(352, 288), 30, media::PIXEL_FORMAT_I420);
+ host_->OnStartCapture(kDeviceId, opened_session_id_, params);
run_loop.Run();
}
@@ -361,9 +361,8 @@ class VideoCaptureHostTest : public testing::Test {
EXPECT_CALL(*host_, OnStateChanged(kDeviceId, VIDEO_CAPTURE_STATE_STOPPED));
media::VideoCaptureParams params;
params.requested_format = media::VideoCaptureFormat(
- 352, 288, 30, media::ConstantResolutionVideoCaptureDevice);
- params.session_id = opened_session_id_;
- host_->OnStartCapture(kDeviceId, params);
+ gfx::Size(352, 288), 30, media::PIXEL_FORMAT_I420);
+ host_->OnStartCapture(kDeviceId, opened_session_id_, params);
host_->OnStopCapture(kDeviceId);
run_loop.RunUntilIdle();
}
@@ -380,11 +379,10 @@ class VideoCaptureHostTest : public testing::Test {
.WillOnce(ExitMessageLoop(message_loop_, run_loop.QuitClosure()));
media::VideoCaptureParams params;
- params.requested_format = media::VideoCaptureFormat(
- width, height, frame_rate, media::ConstantResolutionVideoCaptureDevice);
- params.session_id = opened_session_id_;
+ params.requested_format =
+ media::VideoCaptureFormat(gfx::Size(width, height), frame_rate);
host_->SetDumpVideo(true);
- host_->OnStartCapture(kDeviceId, params);
+ host_->OnStartCapture(kDeviceId, opened_session_id_, params);
run_loop.Run();
}
#endif
« no previous file with comments | « content/browser/renderer_host/media/video_capture_host.cc ('k') | content/browser/renderer_host/media/video_capture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698