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

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

Issue 2673373003: getUserMeida: report device starting states (Closed)
Patch Set: address comments on PS#7 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..c13ca8658198fdf3bad7386a81906ca3cf6d8024 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, which may not be got if capture
dcheng 2017/02/25 07:27:03 Nit: got => received or got => called Ditto elsew
braveyao 2017/02/27 23:18:53 Done.
+ // is stopped immediately.
+ EXPECT_CALL(*this, OnStateChanged(mojom::VideoCaptureState::STARTED))
+ .Times(AtMost(1));
host_->Start(kDeviceId, opened_session_id_, params,
observer_binding_.CreateInterfacePtrAndBind());

Powered by Google App Engine
This is Rietveld 408576698