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

Side by Side Diff: content/renderer/media/webrtc_audio_renderer_unittest.cc

Issue 328493003: Pass the elapsed time from VoE to WebRtcAudioRenderer as the current time for the audio/video eleme… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/media/webrtc_audio_renderer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <vector> 5 #include <vector>
6 6
7 #include "content/renderer/media/audio_device_factory.h" 7 #include "content/renderer/media/audio_device_factory.h"
8 #include "content/renderer/media/audio_message_filter.h" 8 #include "content/renderer/media/audio_message_filter.h"
9 #include "content/renderer/media/media_stream_audio_renderer.h" 9 #include "content/renderer/media/media_stream_audio_renderer.h"
10 #include "content/renderer/media/webrtc/mock_peer_connection_dependency_factory. h" 10 #include "content/renderer/media/webrtc/mock_peer_connection_dependency_factory. h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 MockAudioDeviceFactory() {} 61 MockAudioDeviceFactory() {}
62 virtual ~MockAudioDeviceFactory() {} 62 virtual ~MockAudioDeviceFactory() {}
63 MOCK_METHOD1(CreateOutputDevice, media::AudioOutputDevice*(int)); 63 MOCK_METHOD1(CreateOutputDevice, media::AudioOutputDevice*(int));
64 MOCK_METHOD1(CreateInputDevice, media::AudioInputDevice*(int)); 64 MOCK_METHOD1(CreateInputDevice, media::AudioInputDevice*(int));
65 }; 65 };
66 66
67 class MockAudioRendererSource : public WebRtcAudioRendererSource { 67 class MockAudioRendererSource : public WebRtcAudioRendererSource {
68 public: 68 public:
69 MockAudioRendererSource() {} 69 MockAudioRendererSource() {}
70 virtual ~MockAudioRendererSource() {} 70 virtual ~MockAudioRendererSource() {}
71 MOCK_METHOD3(RenderData, void(media::AudioBus* audio_bus, 71 MOCK_METHOD4(RenderData, void(media::AudioBus* audio_bus,
72 int sample_rate, 72 int sample_rate,
73 int audio_delay_milliseconds)); 73 int audio_delay_milliseconds,
74 base::TimeDelta* current_time));
74 MOCK_METHOD1(RemoveAudioRenderer, void(WebRtcAudioRenderer* renderer)); 75 MOCK_METHOD1(RemoveAudioRenderer, void(WebRtcAudioRenderer* renderer));
75 }; 76 };
76 77
77 } // namespace 78 } // namespace
78 79
79 class WebRtcAudioRendererTest : public testing::Test { 80 class WebRtcAudioRendererTest : public testing::Test {
80 protected: 81 protected:
81 WebRtcAudioRendererTest() 82 WebRtcAudioRendererTest()
82 : message_loop_(new base::MessageLoopForIO), 83 : message_loop_(new base::MessageLoopForIO),
83 mock_ipc_(new MockAudioOutputIPC()), 84 mock_ipc_(new MockAudioOutputIPC()),
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } else { 145 } else {
145 // When the last proxy is stopped, the sink will stop. 146 // When the last proxy is stopped, the sink will stop.
146 EXPECT_CALL(*source_.get(), RemoveAudioRenderer(renderer_.get())); 147 EXPECT_CALL(*source_.get(), RemoveAudioRenderer(renderer_.get()));
147 EXPECT_CALL(*mock_output_device_, Stop()); 148 EXPECT_CALL(*mock_output_device_, Stop());
148 } 149 }
149 renderer_proxies_[i]->Stop(); 150 renderer_proxies_[i]->Stop();
150 } 151 }
151 } 152 }
152 153
153 } // namespace content 154 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_audio_renderer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698