| 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 2b98a1175e9519f14ba285c24b0a469a49f681ec..347fe193a7bb90466d3d841f71823f29fba194f4 100644
|
| --- a/content/browser/renderer_host/media/video_capture_host_unittest.cc
|
| +++ b/content/browser/renderer_host/media/video_capture_host_unittest.cc
|
| @@ -61,12 +61,6 @@ namespace content {
|
| // video_capture_host. This is an arbitrary value.
|
| static const int kDeviceId = 555;
|
|
|
| -// Define to enable test where video is dumped to file.
|
| -// #define DUMP_VIDEO
|
| -
|
| -// Define to use a real video capture device.
|
| -// #define TEST_REAL_CAPTURE_DEVICE
|
| -
|
| // Simple class used for dumping video to a file. This can be used for
|
| // verifying the output.
|
| class DumpVideo {
|
| @@ -272,10 +266,10 @@ class VideoCaptureHostTest : public testing::Test {
|
|
|
| // Create our own MediaStreamManager.
|
| audio_manager_ = media::AudioManager::CreateForTesting(task_runner_);
|
| -#ifndef TEST_REAL_CAPTURE_DEVICE
|
| +
|
| base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
| switches::kUseFakeDeviceForMediaStream);
|
| -#endif
|
| +
|
| media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get()));
|
| media_stream_manager_->UseFakeUIForTests(
|
| std::unique_ptr<FakeMediaStreamUIProxy>());
|
| @@ -407,26 +401,6 @@ class VideoCaptureHostTest : public testing::Test {
|
| WaitForVideoDeviceThread();
|
| }
|
|
|
| -#ifdef DUMP_VIDEO
|
| - void CaptureAndDumpVideo(int width, int height, int frame_rate) {
|
| - InSequence s;
|
| - EXPECT_CALL(*host_.get(), OnNewBufferCreated(kDeviceId, _, _, _))
|
| - .Times(AnyNumber()).WillRepeatedly(Return());
|
| -
|
| - base::RunLoop run_loop;
|
| - EXPECT_CALL(*host_, OnBufferFilled(kDeviceId, _, _, _, _, _, _, _, _, _))
|
| - .Times(AnyNumber())
|
| - .WillOnce(ExitMessageLoop(message_loop_, run_loop.QuitClosure()));
|
| -
|
| - media::VideoCaptureParams params;
|
| - params.requested_format =
|
| - media::VideoCaptureFormat(gfx::Size(width, height), frame_rate);
|
| - host_->SetDumpVideo(true);
|
| - host_->OnStartCapture(kDeviceId, opened_session_id_, params);
|
| - run_loop.Run();
|
| - }
|
| -#endif
|
| -
|
| void StopCapture() {
|
| base::RunLoop run_loop;
|
| EXPECT_CALL(*host_.get(),
|
| @@ -533,14 +507,4 @@ TEST_F(VideoCaptureHostTest, StartCaptureError) {
|
| SimulateError();
|
| base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(200));
|
| }
|
| -
|
| -#ifdef DUMP_VIDEO
|
| -TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) {
|
| - CaptureAndDumpVideo(640, 480, 30);
|
| -}
|
| -TEST_F(VideoCaptureHostTest, CaptureAndDump720P) {
|
| - CaptureAndDumpVideo(1280, 720, 30);
|
| -}
|
| -#endif
|
| -
|
| } // namespace content
|
|
|