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()); |