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

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

Issue 2721113002: getUserMedia: handle the device starting status report. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/video_capture_manager_unittest.cc
diff --git a/content/browser/renderer_host/media/video_capture_manager_unittest.cc b/content/browser/renderer_host/media/video_capture_manager_unittest.cc
index aefd642ddf038f27afbb99691167b05dcd793d41..3e1f5c2a75d92f17ce288bb14239a6311f0fb612 100644
--- a/content/browser/renderer_host/media/video_capture_manager_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_manager_unittest.cc
@@ -363,8 +363,11 @@ TEST_F(VideoCaptureManagerTest, AddObserver) {
EXPECT_CALL(observer,
OnVideoCaptureStarted(WrappedDeviceFactory::DEFAULT_FACING));
+ EXPECT_CALL(*listener_, Opened(MEDIA_DEVICE_VIDEO_CAPTURE, _));
+ EXPECT_CALL(*frame_observer_, OnStarted(_));
EXPECT_CALL(observer,
OnVideoCaptureStopped(WrappedDeviceFactory::DEFAULT_FACING));
+ EXPECT_CALL(*listener_, Closed(MEDIA_DEVICE_VIDEO_CAPTURE, _));
chfremer 2017/03/02 17:56:10 Why are we adding these expectations? It appears
braveyao 2017/03/03 17:53:12 Done. No particular reason. Just to remove the GMO
chfremer 2017/03/03 19:08:33 Ah, I understand. I think the GMOCK Warning also r
braveyao 2017/03/03 21:34:55 Acknowledged.
int video_session_id = vcm_->Open(devices_.front());
VideoCaptureControllerID client_id = StartClient(video_session_id, true);
@@ -740,6 +743,7 @@ TEST_F(VideoCaptureManagerTest, PauseAndResumeClient) {
// Add a second client that is never paused, then pause/resume the first
// client, and no calls to VideoCaptureDevice::MaybeSuspend() or Resume() are
// made.
+ EXPECT_CALL(*frame_observer_, OnStarted(_));
chfremer 2017/03/02 17:56:10 Hmm. The purpose of this test is somewhat unclear
braveyao 2017/03/03 17:53:12 This is needed because StartClient() are called tw
const VideoCaptureControllerID client_id2 =
StartClient(video_session_id, true);
PauseClient(client_id);

Powered by Google App Engine
This is Rietveld 408576698