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

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

Issue 23691038: Switch LiveAudio to source provider solution. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased and fixed some unittests Created 7 years, 3 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_local_audio_track_unittest.cc
diff --git a/content/renderer/media/webrtc_local_audio_track_unittest.cc b/content/renderer/media/webrtc_local_audio_track_unittest.cc
index 7d125dcdf825e226b95ab1a842f5763ddce6b101..316218cb64e4d694d9c29d91b7586c0102e4422f 100644
--- a/content/renderer/media/webrtc_local_audio_track_unittest.cc
+++ b/content/renderer/media/webrtc_local_audio_track_unittest.cc
@@ -134,6 +134,7 @@ class WebRtcLocalAudioTrackTest : public ::testing::Test {
protected:
virtual void SetUp() OVERRIDE {
capturer_ = WebRtcAudioCapturer::CreateCapturer();
+ capturer_->EnablePeerConnectionMode();
tommi (sloooow) - chröme 2013/09/06 11:20:30 why do we need this? Should we run all tests twic
no longer working on chromium 2013/09/10 12:43:15 Oh, we don't need this. Removed.
capturer_source_ = new MockCapturerSource();
EXPECT_CALL(*capturer_source_.get(), Initialize(_, capturer_.get(), 0))
.WillOnce(Return());
@@ -167,7 +168,7 @@ TEST_F(WebRtcLocalAudioTrackTest, ConnectAndDisconnectOneSink) {
EXPECT_CALL(*capturer_source_.get(), Start()).WillOnce(Return());
RTCMediaConstraints constraints;
scoped_refptr<WebRtcLocalAudioTrack> track =
- WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL,
+ WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL, NULL,
&constraints);
track->Start();
EXPECT_TRUE(track->enabled());
@@ -213,7 +214,7 @@ TEST_F(WebRtcLocalAudioTrackTest, DISABLED_DisableEnableAudioTrack) {
EXPECT_CALL(*capturer_source_.get(), Start()).WillOnce(Return());
RTCMediaConstraints constraints;
scoped_refptr<WebRtcLocalAudioTrack> track =
- WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL,
+ WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL, NULL,
&constraints);
track->Start();
static_cast<webrtc::AudioTrackInterface*>(track.get())->
@@ -263,7 +264,7 @@ TEST_F(WebRtcLocalAudioTrackTest, MultipleAudioTracks) {
EXPECT_CALL(*capturer_source_.get(), Start()).WillOnce(Return());
RTCMediaConstraints constraints;
scoped_refptr<WebRtcLocalAudioTrack> track_1 =
- WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL,
+ WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL, NULL,
&constraints);
track_1->Start();
static_cast<webrtc::AudioTrackInterface*>(track_1.get())->
@@ -288,7 +289,7 @@ TEST_F(WebRtcLocalAudioTrackTest, MultipleAudioTracks) {
EXPECT_TRUE(event_1.TimedWait(TestTimeouts::tiny_timeout()));
scoped_refptr<WebRtcLocalAudioTrack> track_2 =
- WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL,
+ WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL, NULL,
&constraints);
track_2->Start();
static_cast<webrtc::AudioTrackInterface*>(track_2.get())->
@@ -343,7 +344,7 @@ TEST_F(WebRtcLocalAudioTrackTest, StartOneAudioTrack) {
EXPECT_CALL(*capturer_source_.get(), Start()).Times(1);
RTCMediaConstraints constraints;
scoped_refptr<WebRtcLocalAudioTrack> track =
- WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL,
+ WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL, NULL,
&constraints);
track->Start();
@@ -362,7 +363,7 @@ TEST_F(WebRtcLocalAudioTrackTest, StartAndStopAudioTracks) {
EXPECT_CALL(*capturer_source_.get(), Start()).WillOnce(SignalEvent(&event));
RTCMediaConstraints constraints;
scoped_refptr<WebRtcLocalAudioTrack> track_1 =
- WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL,
+ WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL, NULL,
&constraints);
static_cast<webrtc::AudioTrackInterface*>(track_1.get())->
GetRenderer()->AddChannel(0);
@@ -382,7 +383,7 @@ TEST_F(WebRtcLocalAudioTrackTest, StartAndStopAudioTracks) {
// since it has been started.
EXPECT_CALL(*capturer_source_.get(), Start()).Times(0);
scoped_refptr<WebRtcLocalAudioTrack> track_2 =
- WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL,
+ WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL, NULL,
&constraints);
track_2->Start();
static_cast<webrtc::AudioTrackInterface*>(track_2.get())->
@@ -415,7 +416,7 @@ TEST_F(WebRtcLocalAudioTrackTest, SetNewSourceForCapturerAfterStartTrack) {
EXPECT_CALL(*capturer_source_.get(), Start()).Times(1);
RTCMediaConstraints constraints;
scoped_refptr<WebRtcLocalAudioTrack> track =
- WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL,
+ WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL, NULL,
&constraints);
track->Start();
@@ -442,7 +443,7 @@ TEST_F(WebRtcLocalAudioTrackTest, ConnectTracksToDifferentCapturers) {
EXPECT_CALL(*capturer_source_.get(), Start()).Times(1);
RTCMediaConstraints constraints;
scoped_refptr<WebRtcLocalAudioTrack> track_1 =
- WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL,
+ WebRtcLocalAudioTrack::Create(std::string(), capturer_, NULL, NULL,
&constraints);
track_1->Start();
@@ -482,7 +483,7 @@ TEST_F(WebRtcLocalAudioTrackTest, ConnectTracksToDifferentCapturers) {
// Setup the second audio track, connect it to the new capturer and start it.
EXPECT_CALL(*new_source.get(), Start()).Times(1);
scoped_refptr<WebRtcLocalAudioTrack> track_2 =
- WebRtcLocalAudioTrack::Create(std::string(), new_capturer, NULL,
+ WebRtcLocalAudioTrack::Create(std::string(), new_capturer, NULL, NULL,
&constraints);
track_2->Start();

Powered by Google App Engine
This is Rietveld 408576698