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

Unified Diff: media/capture/video/video_capture_device_unittest.cc

Issue 2673373003: getUserMeida: report device starting states (Closed)
Patch Set: address comments on PS#8 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: media/capture/video/video_capture_device_unittest.cc
diff --git a/media/capture/video/video_capture_device_unittest.cc b/media/capture/video/video_capture_device_unittest.cc
index 477c911a4f411aee8b70a9835f2049b7a610ec6e..b90b9f37644ce2b0a176ec2e07378637afd74c3b 100644
--- a/media/capture/video/video_capture_device_unittest.cc
+++ b/media/capture/video/video_capture_device_unittest.cc
@@ -101,6 +101,7 @@ class MockVideoCaptureClient : public VideoCaptureDevice::Client {
void(const tracked_objects::Location& from_here,
const std::string& reason));
MOCK_CONST_METHOD0(GetBufferPoolUtilization, double(void));
+ MOCK_METHOD0(OnStarted, void(void));
explicit MockVideoCaptureClient(
base::Callback<void(const VideoCaptureFormat&)> frame_cb)
@@ -406,6 +407,7 @@ TEST_P(VideoCaptureDeviceTest, CaptureWithSize) {
ASSERT_TRUE(device);
EXPECT_CALL(*video_capture_client_, OnError(_, _)).Times(0);
+ EXPECT_CALL(*video_capture_client_, OnStarted());
VideoCaptureParams capture_params;
capture_params.requested_format.frame_size.SetSize(width, height);
@@ -440,6 +442,7 @@ TEST_F(VideoCaptureDeviceTest, MAYBE_AllocateBadSize) {
ASSERT_TRUE(device);
EXPECT_CALL(*video_capture_client_, OnError(_, _)).Times(0);
+ EXPECT_CALL(*video_capture_client_, OnStarted());
const gfx::Size input_size(640, 480);
VideoCaptureParams capture_params;
@@ -520,6 +523,7 @@ TEST_F(VideoCaptureDeviceTest, MAYBE_CaptureMjpeg) {
ASSERT_TRUE(device);
EXPECT_CALL(*video_capture_client_, OnError(_, _)).Times(0);
+ EXPECT_CALL(*video_capture_client_, OnStarted());
VideoCaptureParams capture_params;
capture_params.requested_format.frame_size.SetSize(1280, 720);
@@ -566,6 +570,7 @@ TEST_F(VideoCaptureDeviceTest, MAYBE_TakePhoto) {
ASSERT_TRUE(device);
EXPECT_CALL(*video_capture_client_, OnError(_, _)).Times(0);
+ EXPECT_CALL(*video_capture_client_, OnStarted());
VideoCaptureParams capture_params;
capture_params.requested_format.frame_size.SetSize(320, 240);
@@ -610,6 +615,7 @@ TEST_F(VideoCaptureDeviceTest, MAYBE_GetPhotoCapabilities) {
ASSERT_TRUE(device);
EXPECT_CALL(*video_capture_client_, OnError(_, _)).Times(0);
+ EXPECT_CALL(*video_capture_client_, OnStarted());
VideoCaptureParams capture_params;
capture_params.requested_format.frame_size.SetSize(320, 240);
« no previous file with comments | « media/capture/video/video_capture_device_client_unittest.cc ('k') | media/capture/video/video_frame_receiver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698