Chromium Code Reviews| Index: content/browser/media/capture/desktop_capture_device_aura_unittest.cc |
| diff --git a/content/browser/media/capture/desktop_capture_device_aura_unittest.cc b/content/browser/media/capture/desktop_capture_device_aura_unittest.cc |
| index 8f183081fd5583e1d8267d513767cbfcc1125569..9907e947bb1e14b7aa657fdaf70e41d0246c64f1 100644 |
| --- a/content/browser/media/capture/desktop_capture_device_aura_unittest.cc |
| +++ b/content/browser/media/capture/desktop_capture_device_aura_unittest.cc |
| @@ -25,6 +25,7 @@ |
| using ::testing::_; |
| using ::testing::AnyNumber; |
| +using ::testing::AtMost; |
| using ::testing::DoAll; |
| using ::testing::Expectation; |
| using ::testing::InvokeWithoutArgs; |
| @@ -56,6 +57,7 @@ class MockDeviceClient : public media::VideoCaptureDevice::Client { |
| MOCK_METHOD2(OnError, |
| void(const tracked_objects::Location& from_here, |
| const std::string& reason)); |
| + MOCK_METHOD0(OnStarted, void(void)); |
| // Trampoline methods to workaround GMOCK problems with std::unique_ptr<>. |
| Buffer ReserveOutputBuffer(const gfx::Size& dimensions, |
| @@ -155,6 +157,9 @@ TEST_F(DesktopCaptureDeviceAuraTest, StartAndStop) { |
| std::unique_ptr<MockDeviceClient> client(new MockDeviceClient()); |
| EXPECT_CALL(*client, OnError(_, _)).Times(0); |
| + // |STARTED| is reported asynchronously now, which may not be got if capture |
|
chfremer
2017/02/16 01:00:50
Please remove the word "now".
braveyao
2017/02/17 20:37:21
Done.
|
| + // is stopped immediately. |
| + EXPECT_CALL(*client, OnStarted()).Times(AtMost(1)); |
| media::VideoCaptureParams capture_params; |
| capture_params.requested_format.frame_size.SetSize(640, 480); |