Index: content/browser/renderer_host/media/video_capture_host_unittest.cc |
diff --git a/content/browser/renderer_host/media/video_capture_host_unittest.cc b/content/browser/renderer_host/media/video_capture_host_unittest.cc |
index 69f6712227d1e5d04b8f591507eee0d5af472c8b..e71539cffaf776168d279c3461f5a47d9aabbc25 100644 |
--- a/content/browser/renderer_host/media/video_capture_host_unittest.cc |
+++ b/content/browser/renderer_host/media/video_capture_host_unittest.cc |
@@ -388,13 +388,14 @@ class VideoCaptureHostTest : public testing::Test { |
protected: |
void StartCapture() { |
- EXPECT_CALL(*host_, OnNewBufferCreated(kDeviceId, _, _, _)) |
- .Times(AnyNumber()).WillRepeatedly(Return()); |
+ EXPECT_CALL(*host_.get(), OnNewBufferCreated(kDeviceId, _, _, _)) |
+ .Times(AnyNumber()) |
+ .WillRepeatedly(Return()); |
base::RunLoop run_loop; |
- EXPECT_CALL(*host_, OnBufferFilled(kDeviceId, _, _, _)) |
- .Times(AnyNumber()).WillOnce(ExitMessageLoop( |
- message_loop_, run_loop.QuitClosure())); |
+ EXPECT_CALL(*host_.get(), OnBufferFilled(kDeviceId, _, _, _)) |
+ .Times(AnyNumber()) |
+ .WillOnce(ExitMessageLoop(message_loop_, run_loop.QuitClosure())); |
media::VideoCaptureParams params; |
params.requested_format = media::VideoCaptureFormat( |
@@ -408,7 +409,8 @@ class VideoCaptureHostTest : public testing::Test { |
// asynchronous start operations to complete. |
InSequence s; |
base::RunLoop run_loop; |
- EXPECT_CALL(*host_, OnStateChanged(kDeviceId, VIDEO_CAPTURE_STATE_STOPPED)); |
+ EXPECT_CALL(*host_.get(), |
+ OnStateChanged(kDeviceId, VIDEO_CAPTURE_STATE_STOPPED)); |
media::VideoCaptureParams params; |
params.requested_format = media::VideoCaptureFormat( |
gfx::Size(352, 288), 30, media::PIXEL_FORMAT_I420); |
@@ -439,7 +441,8 @@ class VideoCaptureHostTest : public testing::Test { |
void StopCapture() { |
base::RunLoop run_loop; |
- EXPECT_CALL(*host_, OnStateChanged(kDeviceId, VIDEO_CAPTURE_STATE_STOPPED)) |
+ EXPECT_CALL(*host_.get(), |
+ OnStateChanged(kDeviceId, VIDEO_CAPTURE_STATE_STOPPED)) |
.WillOnce(ExitMessageLoop(message_loop_, run_loop.QuitClosure())); |
host_->OnStopCapture(kDeviceId); |
@@ -455,9 +458,9 @@ class VideoCaptureHostTest : public testing::Test { |
void NotifyPacketReady() { |
base::RunLoop run_loop; |
- EXPECT_CALL(*host_, OnBufferFilled(kDeviceId, _, _, _)) |
- .Times(AnyNumber()).WillOnce(ExitMessageLoop( |
- message_loop_, run_loop.QuitClosure())) |
+ EXPECT_CALL(*host_.get(), OnBufferFilled(kDeviceId, _, _, _)) |
+ .Times(AnyNumber()) |
+ .WillOnce(ExitMessageLoop(message_loop_, run_loop.QuitClosure())) |
.RetiresOnSaturation(); |
run_loop.Run(); |
} |
@@ -468,8 +471,8 @@ class VideoCaptureHostTest : public testing::Test { |
void SimulateError() { |
// Expect a change state to error state sent through IPC. |
- EXPECT_CALL(*host_, OnStateChanged(kDeviceId, VIDEO_CAPTURE_STATE_ERROR)) |
- .Times(1); |
+ EXPECT_CALL(*host_.get(), |
+ OnStateChanged(kDeviceId, VIDEO_CAPTURE_STATE_ERROR)).Times(1); |
VideoCaptureControllerID id(kDeviceId); |
host_->OnError(id); |
// Wait for the error callback. |
@@ -497,8 +500,8 @@ TEST_F(VideoCaptureHostTest, CloseSessionWithoutStopping) { |
// When the session is closed via the stream without stopping capture, the |
// ENDED event is sent. |
- EXPECT_CALL(*host_, OnStateChanged(kDeviceId, VIDEO_CAPTURE_STATE_ENDED)) |
- .Times(1); |
+ EXPECT_CALL(*host_.get(), |
+ OnStateChanged(kDeviceId, VIDEO_CAPTURE_STATE_ENDED)).Times(1); |
CloseSession(); |
base::RunLoop().RunUntilIdle(); |
} |
@@ -522,8 +525,8 @@ TEST_F(VideoCaptureHostTest, StartCaptureErrorStop) { |
} |
TEST_F(VideoCaptureHostTest, StartCaptureError) { |
- EXPECT_CALL(*host_, OnStateChanged(kDeviceId, VIDEO_CAPTURE_STATE_STOPPED)) |
- .Times(0); |
+ EXPECT_CALL(*host_.get(), |
+ OnStateChanged(kDeviceId, VIDEO_CAPTURE_STATE_STOPPED)).Times(0); |
StartCapture(); |
NotifyPacketReady(); |
SimulateError(); |