| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <map> | 5 #include <map> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 StreamDeviceInfoArray devices; | 327 StreamDeviceInfoArray devices; |
| 328 { | 328 { |
| 329 base::RunLoop run_loop; | 329 base::RunLoop run_loop; |
| 330 std::string label = media_stream_manager_->EnumerateDevices( | 330 std::string label = media_stream_manager_->EnumerateDevices( |
| 331 &stream_requester_, | 331 &stream_requester_, |
| 332 render_process_id, | 332 render_process_id, |
| 333 render_frame_id, | 333 render_frame_id, |
| 334 browser_context_.GetResourceContext()->GetMediaDeviceIDSalt(), | 334 browser_context_.GetResourceContext()->GetMediaDeviceIDSalt(), |
| 335 page_request_id, | 335 page_request_id, |
| 336 MEDIA_DEVICE_VIDEO_CAPTURE, | 336 MEDIA_DEVICE_VIDEO_CAPTURE, |
| 337 security_origin, | 337 security_origin); |
| 338 true); | |
| 339 EXPECT_CALL(stream_requester_, DevicesEnumerated(render_frame_id, | 338 EXPECT_CALL(stream_requester_, DevicesEnumerated(render_frame_id, |
| 340 page_request_id, | 339 page_request_id, |
| 341 label, | 340 label, |
| 342 _)) | 341 _)) |
| 343 .Times(1).WillOnce( | 342 .Times(1).WillOnce( |
| 344 DoAll(ExitMessageLoop(message_loop_, run_loop.QuitClosure()), | 343 DoAll(ExitMessageLoop(message_loop_, run_loop.QuitClosure()), |
| 345 SaveArg<3>(&devices))); | 344 SaveArg<3>(&devices))); |
| 346 run_loop.Run(); | 345 run_loop.Run(); |
| 347 Mock::VerifyAndClearExpectations(&stream_requester_); | 346 Mock::VerifyAndClearExpectations(&stream_requester_); |
| 348 media_stream_manager_->CancelRequest(label); | 347 media_stream_manager_->CancelRequest(label); |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 #ifdef DUMP_VIDEO | 535 #ifdef DUMP_VIDEO |
| 537 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) { | 536 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) { |
| 538 CaptureAndDumpVideo(640, 480, 30); | 537 CaptureAndDumpVideo(640, 480, 30); |
| 539 } | 538 } |
| 540 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) { | 539 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) { |
| 541 CaptureAndDumpVideo(1280, 720, 30); | 540 CaptureAndDumpVideo(1280, 720, 30); |
| 542 } | 541 } |
| 543 #endif | 542 #endif |
| 544 | 543 |
| 545 } // namespace content | 544 } // namespace content |
| OLD | NEW |