Update test/ to not use implicit T* --> scoped_refptr<T> conversion
Bug: webrtc:13464
Change-Id: Id0191dfb2028e29499fabb6c58a00c06460c01dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/246200
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35685}
diff --git a/test/mock_audio_encoder_factory.h b/test/mock_audio_encoder_factory.h
index 392a4c1..fc150d6 100644
--- a/test/mock_audio_encoder_factory.h
+++ b/test/mock_audio_encoder_factory.h
@@ -57,8 +57,7 @@
using ::testing::AnyNumber;
using ::testing::Return;
- rtc::scoped_refptr<webrtc::MockAudioEncoderFactory> factory =
- new rtc::RefCountedObject<webrtc::MockAudioEncoderFactory>;
+ auto factory = rtc::make_ref_counted<webrtc::MockAudioEncoderFactory>();
ON_CALL(*factory.get(), GetSupportedEncoders())
.WillByDefault(Return(std::vector<webrtc::AudioCodecSpec>()));
ON_CALL(*factory.get(), QueryAudioEncoder(_))
@@ -80,8 +79,7 @@
using ::testing::Return;
using ::testing::SetArgPointee;
- rtc::scoped_refptr<webrtc::MockAudioEncoderFactory> factory =
- new rtc::RefCountedObject<webrtc::MockAudioEncoderFactory>;
+ auto factory = rtc::make_ref_counted<webrtc::MockAudioEncoderFactory>();
ON_CALL(*factory.get(), GetSupportedEncoders())
.WillByDefault(Return(std::vector<webrtc::AudioCodecSpec>()));
ON_CALL(*factory.get(), QueryAudioEncoder(_))