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

Side by Side Diff: content/browser/renderer_host/media/video_capture_host_unittest.cc

Issue 344653003: Revert 274608 "Implement getMediaDevices." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2057/src/
Patch Set: Created 6 years, 6 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 StreamDeviceInfoArray devices; 329 StreamDeviceInfoArray devices;
330 { 330 {
331 base::RunLoop run_loop; 331 base::RunLoop run_loop;
332 std::string label = media_stream_manager_->EnumerateDevices( 332 std::string label = media_stream_manager_->EnumerateDevices(
333 &stream_requester_, 333 &stream_requester_,
334 render_process_id, 334 render_process_id,
335 render_view_id, 335 render_view_id,
336 browser_context_.GetResourceContext()->GetMediaDeviceIDSalt(), 336 browser_context_.GetResourceContext()->GetMediaDeviceIDSalt(),
337 page_request_id, 337 page_request_id,
338 MEDIA_DEVICE_VIDEO_CAPTURE, 338 MEDIA_DEVICE_VIDEO_CAPTURE,
339 security_origin, 339 security_origin);
340 true);
341 EXPECT_CALL(stream_requester_, DevicesEnumerated(render_view_id, 340 EXPECT_CALL(stream_requester_, DevicesEnumerated(render_view_id,
342 page_request_id, 341 page_request_id,
343 label, 342 label,
344 _)) 343 _))
345 .Times(1).WillOnce( 344 .Times(1).WillOnce(
346 DoAll(ExitMessageLoop(message_loop_, run_loop.QuitClosure()), 345 DoAll(ExitMessageLoop(message_loop_, run_loop.QuitClosure()),
347 SaveArg<3>(&devices))); 346 SaveArg<3>(&devices)));
348 run_loop.Run(); 347 run_loop.Run();
349 Mock::VerifyAndClearExpectations(&stream_requester_); 348 Mock::VerifyAndClearExpectations(&stream_requester_);
350 media_stream_manager_->CancelRequest(label); 349 media_stream_manager_->CancelRequest(label);
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 #ifdef DUMP_VIDEO 534 #ifdef DUMP_VIDEO
536 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) { 535 TEST_F(VideoCaptureHostTest, CaptureAndDumpVideoVga) {
537 CaptureAndDumpVideo(640, 480, 30); 536 CaptureAndDumpVideo(640, 480, 30);
538 } 537 }
539 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) { 538 TEST_F(VideoCaptureHostTest, CaptureAndDump720P) {
540 CaptureAndDumpVideo(1280, 720, 30); 539 CaptureAndDumpVideo(1280, 720, 30);
541 } 540 }
542 #endif 541 #endif
543 542
544 } // namespace content 543 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/media_stream_manager.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698