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

Unified Diff: content/renderer/media/webrtc_audio_device_unittest.cc

Issue 11166002: Plumb render view ID from audio-related code in renderer through IPCs to AudioRendererHost in brows… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 8 years, 2 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/renderer/media/webrtc_audio_device_unittest.cc
diff --git a/content/renderer/media/webrtc_audio_device_unittest.cc b/content/renderer/media/webrtc_audio_device_unittest.cc
index 323538589d1f840537cfc6e1d05fe6e3d7767e56..4e39a55f60800be35a01d4d271e401ef162e4890 100644
--- a/content/renderer/media/webrtc_audio_device_unittest.cc
+++ b/content/renderer/media/webrtc_audio_device_unittest.cc
@@ -24,6 +24,8 @@ using testing::StrEq;
namespace {
+const int kRenderViewId = -2;
+
class AudioUtil : public AudioUtilInterface {
public:
AudioUtil() {}
@@ -224,7 +226,7 @@ TEST_F(WebRTCAudioDeviceTest, Construct) {
AudioUtilNoHardware audio_util(48000, 48000, media::CHANNEL_LAYOUT_MONO);
SetAudioUtilCallback(&audio_util);
scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device(
- new WebRtcAudioDeviceImpl());
+ new WebRtcAudioDeviceImpl(kRenderViewId));
webrtc_audio_device->SetSessionId(1);
@@ -265,7 +267,7 @@ TEST_F(WebRTCAudioDeviceTest, StartPlayout) {
OnDeleteAudioStream(_, 1)).Times(AnyNumber());
scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device(
- new WebRtcAudioDeviceImpl());
+ new WebRtcAudioDeviceImpl(kRenderViewId));
webrtc_audio_device->SetSessionId(1);
WebRTCAutoDelete<webrtc::VoiceEngine> engine(webrtc::VoiceEngine::Create());
ASSERT_TRUE(engine.valid());
@@ -333,7 +335,7 @@ TEST_F(WebRTCAudioDeviceTest, StartRecording) {
// EXPECT_CALL() macros here.
scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device(
- new WebRtcAudioDeviceImpl());
+ new WebRtcAudioDeviceImpl(kRenderViewId));
webrtc_audio_device->SetSessionId(1);
WebRTCAutoDelete<webrtc::VoiceEngine> engine(webrtc::VoiceEngine::Create());
ASSERT_TRUE(engine.valid());
@@ -409,7 +411,7 @@ TEST_F(WebRTCAudioDeviceTest, PlayLocalFile) {
OnDeleteAudioStream(_, 1)).Times(AnyNumber());
scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device(
- new WebRtcAudioDeviceImpl());
+ new WebRtcAudioDeviceImpl(kRenderViewId));
webrtc_audio_device->SetSessionId(1);
WebRTCAutoDelete<webrtc::VoiceEngine> engine(webrtc::VoiceEngine::Create());
@@ -477,7 +479,7 @@ TEST_F(WebRTCAudioDeviceTest, FullDuplexAudioWithAGC) {
OnDeleteAudioStream(_, 1)).Times(AnyNumber());
scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device(
- new WebRtcAudioDeviceImpl());
+ new WebRtcAudioDeviceImpl(kRenderViewId));
webrtc_audio_device->SetSessionId(1);
WebRTCAutoDelete<webrtc::VoiceEngine> engine(webrtc::VoiceEngine::Create());
ASSERT_TRUE(engine.valid());

Powered by Google App Engine
This is Rietveld 408576698