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

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

Issue 2673373003: getUserMeida: report device starting states (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_unittest.cc
diff --git a/content/browser/renderer_host/media/video_capture_unittest.cc b/content/browser/renderer_host/media/video_capture_unittest.cc
index b2ce87ec007dd49609bef2d9367daaf932f70ab9..b792e9cee8ce497bff93a17ca97ceea0d6203c46 100644
--- a/content/browser/renderer_host/media/video_capture_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_unittest.cc
@@ -38,6 +38,7 @@
using ::testing::_;
using ::testing::AnyNumber;
+using ::testing::AtMost;
using ::testing::DoAll;
using ::testing::InSequence;
using ::testing::Mock;
@@ -244,7 +245,10 @@ class VideoCaptureTest : public testing::Test,
params.requested_format = media::VideoCaptureFormat(
gfx::Size(352, 288), 30, media::PIXEL_FORMAT_I420);
- EXPECT_CALL(*this, OnStateChanged(mojom::VideoCaptureState::STARTED));
+ // |STARTED| is reported asynchronously now, which may not be got if capture
+ // is stopped immediately.
chfremer 2017/02/16 01:00:50 Please remove the "now", because the reader of the
braveyao 2017/02/17 20:37:21 Done.
+ EXPECT_CALL(*this, OnStateChanged(mojom::VideoCaptureState::STARTED))
+ .Times(AtMost(1));
chfremer 2017/02/09 23:34:52 Do we really want to modify the contract between V
braveyao 2017/02/14 01:05:49 It's natural to me that a stop request can cancel
chfremer 2017/02/14 19:21:22 I think it is confusing for the listener when a ST
braveyao 2017/02/15 21:47:15 As we discussed, the current processing is OK. Kee
chfremer 2017/02/16 01:00:50 As per our offline discussion, I understand that t
braveyao 2017/02/17 20:37:20 Done.
chfremer 2017/02/17 23:51:14 I couldn't find this change in PatchSet#6. Also no
braveyao 2017/02/22 18:06:44 "InSequence" is in this function already, at line
host_->Start(kDeviceId, opened_session_id_, params,
observer_binding_.CreateInterfacePtrAndBind());

Powered by Google App Engine
This is Rietveld 408576698