| Index: content/browser/renderer_host/media/desktop_capture_device_unittest.cc
|
| diff --git a/content/browser/renderer_host/media/desktop_capture_device_unittest.cc b/content/browser/renderer_host/media/desktop_capture_device_unittest.cc
|
| index 9ae5469461699314dd1aed8b275ddad65f772479..c1b0471eb9947b4ee7bb4bbf60845735787c8f97 100644
|
| --- a/content/browser/renderer_host/media/desktop_capture_device_unittest.cc
|
| +++ b/content/browser/renderer_host/media/desktop_capture_device_unittest.cc
|
| @@ -47,15 +47,14 @@ class MockDeviceClient : public media::VideoCaptureDevice::Client {
|
| MOCK_METHOD5(OnIncomingCapturedFrame,
|
| void(const uint8* data,
|
| int length,
|
| - base::TimeTicks timestamp,
|
| + const media::VideoCaptureFormat& frame_format,
|
| int rotation,
|
| - const media::VideoCaptureFormat& frame_format));
|
| - MOCK_METHOD5(OnIncomingCapturedBuffer,
|
| + base::TimeTicks timestamp));
|
| + MOCK_METHOD4(OnIncomingCapturedVideoFrame,
|
| void(const scoped_refptr<Buffer>& buffer,
|
| - media::VideoFrame::Format format,
|
| - const gfx::Size& dimensions,
|
| - base::TimeTicks timestamp,
|
| - int frame_rate));
|
| + const media::VideoCaptureFormat& buffer_format,
|
| + const scoped_refptr<media::VideoFrame>& frame,
|
| + base::TimeTicks timestamp));
|
| };
|
|
|
| // DesktopFrame wrapper that flips wrapped frame upside down by inverting
|
| @@ -157,11 +156,10 @@ TEST_F(DesktopCaptureDeviceTest, MAYBE_Capture) {
|
|
|
| scoped_ptr<MockDeviceClient> client(new MockDeviceClient());
|
| EXPECT_CALL(*client, OnError()).Times(0);
|
| - EXPECT_CALL(*client, OnIncomingCapturedFrame(_, _, _, _, _))
|
| - .WillRepeatedly(
|
| - DoAll(SaveArg<1>(&frame_size),
|
| - SaveArg<4>(&format),
|
| - InvokeWithoutArgs(&done_event, &base::WaitableEvent::Signal)));
|
| + EXPECT_CALL(*client, OnIncomingCapturedFrame(_, _, _, _, _)).WillRepeatedly(
|
| + DoAll(SaveArg<1>(&frame_size),
|
| + SaveArg<2>(&format),
|
| + InvokeWithoutArgs(&done_event, &base::WaitableEvent::Signal)));
|
|
|
| media::VideoCaptureParams capture_params;
|
| capture_params.requested_format.frame_size.SetSize(640, 480);
|
| @@ -197,11 +195,10 @@ TEST_F(DesktopCaptureDeviceTest, ScreenResolutionChangeConstantResolution) {
|
|
|
| scoped_ptr<MockDeviceClient> client(new MockDeviceClient());
|
| EXPECT_CALL(*client, OnError()).Times(0);
|
| - EXPECT_CALL(*client, OnIncomingCapturedFrame(_, _, _, _, _))
|
| - .WillRepeatedly(
|
| - DoAll(SaveArg<1>(&frame_size),
|
| - SaveArg<4>(&format),
|
| - InvokeWithoutArgs(&done_event, &base::WaitableEvent::Signal)));
|
| + EXPECT_CALL(*client, OnIncomingCapturedFrame(_, _, _, _, _)).WillRepeatedly(
|
| + DoAll(SaveArg<1>(&frame_size),
|
| + SaveArg<2>(&format),
|
| + InvokeWithoutArgs(&done_event, &base::WaitableEvent::Signal)));
|
|
|
| media::VideoCaptureParams capture_params;
|
| capture_params.requested_format.frame_size.SetSize(kTestFrameWidth1,
|
| @@ -244,10 +241,9 @@ TEST_F(DesktopCaptureDeviceTest, ScreenResolutionChangeVariableResolution) {
|
|
|
| scoped_ptr<MockDeviceClient> client(new MockDeviceClient());
|
| EXPECT_CALL(*client, OnError()).Times(0);
|
| - EXPECT_CALL(*client, OnIncomingCapturedFrame(_, _, _, _, _))
|
| - .WillRepeatedly(
|
| - DoAll(SaveArg<4>(&format),
|
| - InvokeWithoutArgs(&done_event, &base::WaitableEvent::Signal)));
|
| + EXPECT_CALL(*client, OnIncomingCapturedFrame(_, _, _, _, _)).WillRepeatedly(
|
| + DoAll(SaveArg<2>(&format),
|
| + InvokeWithoutArgs(&done_event, &base::WaitableEvent::Signal)));
|
|
|
| media::VideoCaptureParams capture_params;
|
| capture_params.requested_format.frame_size.SetSize(kTestFrameWidth2,
|
|
|