Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1035)

Unified Diff: content/browser/renderer_host/media/video_capture_host_unittest.cc

Issue 501033003: Remove implicit conversions from scoped_refptr to T* in content/browser/renderer_host/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698