Chromium Code Reviews| Index: content/browser/media/capture/screen_capture_device_android_unittest.cc |
| diff --git a/content/browser/media/capture/screen_capture_device_android_unittest.cc b/content/browser/media/capture/screen_capture_device_android_unittest.cc |
| index dffe27a5e875f0b890819c9e692292d7fbf54dcf..cd7db9d202185d5c593bad8ad330d8545a6cd2b5 100644 |
| --- a/content/browser/media/capture/screen_capture_device_android_unittest.cc |
| +++ b/content/browser/media/capture/screen_capture_device_android_unittest.cc |
| @@ -9,6 +9,7 @@ |
| #include "testing/gtest/include/gtest/gtest.h" |
| using ::testing::_; |
| +using ::testing::AtMost; |
| namespace content { |
| namespace { |
| @@ -33,6 +34,7 @@ class MockDeviceClient : public media::VideoCaptureDevice::Client { |
| void(const tracked_objects::Location& from_here, |
| const std::string& reason)); |
| MOCK_CONST_METHOD0(GetBufferPoolUtilization, double(void)); |
| + MOCK_METHOD0(OnStarted, void(void)); |
| // Trampoline methods to workaround GMOCK problems with std::unique_ptr<>. |
| Buffer ReserveOutputBuffer(const gfx::Size& dimensions, |
| @@ -92,6 +94,9 @@ TEST_F(ScreenCaptureDeviceAndroidTest, DISABLED_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); |