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

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

Issue 2721113002: getUserMedia: handle the device starting status report. (Closed)
Patch Set: address nits Created 3 years, 9 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
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 // Unit test for VideoCaptureManager. 5 // Unit test for VideoCaptureManager.
6 6
7 #include "content/browser/renderer_host/media/video_capture_manager.h" 7 #include "content/browser/renderer_host/media/video_capture_manager.h"
8 8
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 EXPECT_CALL(*video_capture_device_factory_, WillResumeDevice()).Times(1); 735 EXPECT_CALL(*video_capture_device_factory_, WillResumeDevice()).Times(1);
736 ResumeClient(video_session_id, client_id); 736 ResumeClient(video_session_id, client_id);
737 737
738 // Attempting to resume the client a second time should not cause any calls to 738 // Attempting to resume the client a second time should not cause any calls to
739 // VideoCaptureDevice::Resume(). 739 // VideoCaptureDevice::Resume().
740 ResumeClient(video_session_id, client_id); 740 ResumeClient(video_session_id, client_id);
741 741
742 // Add a second client that is never paused, then pause/resume the first 742 // Add a second client that is never paused, then pause/resume the first
743 // client, and no calls to VideoCaptureDevice::MaybeSuspend() or Resume() are 743 // client, and no calls to VideoCaptureDevice::MaybeSuspend() or Resume() are
744 // made. 744 // made.
745 EXPECT_CALL(*frame_observer_, OnStarted(_));
745 const VideoCaptureControllerID client_id2 = 746 const VideoCaptureControllerID client_id2 =
746 StartClient(video_session_id, true); 747 StartClient(video_session_id, true);
747 PauseClient(client_id); 748 PauseClient(client_id);
748 ResumeClient(video_session_id, client_id); 749 ResumeClient(video_session_id, client_id);
749 750
750 StopClient(client_id); 751 StopClient(client_id);
751 StopClient(client_id2); 752 StopClient(client_id2);
752 753
753 EXPECT_CALL(*listener_, Closed(MEDIA_DEVICE_VIDEO_CAPTURE, _)); 754 EXPECT_CALL(*listener_, Closed(MEDIA_DEVICE_VIDEO_CAPTURE, _));
754 vcm_->Close(video_session_id); 755 vcm_->Close(video_session_id);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 // Wait to check callbacks before removing the listener. 789 // Wait to check callbacks before removing the listener.
789 base::RunLoop().RunUntilIdle(); 790 base::RunLoop().RunUntilIdle();
790 vcm_->UnregisterListener(); 791 vcm_->UnregisterListener();
791 } 792 }
792 #endif 793 #endif
793 794
794 // TODO(mcasas): Add a test to check consolidation of the supported formats 795 // TODO(mcasas): Add a test to check consolidation of the supported formats
795 // provided by the device when http://crbug.com/323913 is closed. 796 // provided by the device when http://crbug.com/323913 is closed.
796 797
797 } // namespace content 798 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/video_capture_controller_unittest.cc ('k') | content/common/media/media_stream_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698