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

Unified Diff: talk/media/webrtc/webrtcvoiceengine_unittest.cc

Issue 1364643003: Remove the default send channel in WVoE. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@wvoe_default_receive_channel
Patch Set: bogus Created 5 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: talk/media/webrtc/webrtcvoiceengine_unittest.cc
diff --git a/talk/media/webrtc/webrtcvoiceengine_unittest.cc b/talk/media/webrtc/webrtcvoiceengine_unittest.cc
index 9e4d00c930d428425859c458a041356dba5ce832..f10d42a920e41c8d97dbd9b5bbc04f090b5aeba8 100644
--- a/talk/media/webrtc/webrtcvoiceengine_unittest.cc
+++ b/talk/media/webrtc/webrtcvoiceengine_unittest.cc
@@ -146,12 +146,11 @@ class WebRtcVoiceEngineTestFake : public testing::Test {
channel_ = engine_.CreateChannel(&call_, cricket::AudioOptions());
EXPECT_TRUE(channel_ != nullptr);
if (caller) {
- // if this is a caller, local description will be applied and add the
+ // If this is a caller, local description will be applied and add the
// send stream.
EXPECT_TRUE(channel_->AddSendStream(
cricket::StreamParams::CreateLegacy(kSsrc1)));
}
- int channel_id = voe_.GetLastChannel();
// Test we can only InsertDtmf when the other side supports telephone-event.
EXPECT_TRUE(channel_->SetSendParameters(send_parameters_));
@@ -163,7 +162,7 @@ class WebRtcVoiceEngineTestFake : public testing::Test {
EXPECT_TRUE(channel_->CanInsertDtmf());
if (!caller) {
- // There's no active send channel yet.
+ // If this is callee, there's no active send channel yet.
EXPECT_FALSE(channel_->InsertDtmf(ssrc, 2, 123, cricket::DF_SEND));
EXPECT_TRUE(channel_->AddSendStream(
cricket::StreamParams::CreateLegacy(kSsrc1)));
@@ -173,6 +172,7 @@ class WebRtcVoiceEngineTestFake : public testing::Test {
EXPECT_FALSE(channel_->InsertDtmf(-1, 1, 111, cricket::DF_SEND));
// Test send
+ int channel_id = voe_.GetLastChannel();
EXPECT_FALSE(voe_.WasSendTelephoneEventCalled(channel_id, 2, 123));
EXPECT_TRUE(channel_->InsertDtmf(ssrc, 2, 123, cricket::DF_SEND));
EXPECT_TRUE(voe_.WasSendTelephoneEventCalled(channel_id, 2, 123));
@@ -212,7 +212,7 @@ class WebRtcVoiceEngineTestFake : public testing::Test {
}
void TestSetSendRtpHeaderExtensions(const std::string& ext) {
- EXPECT_TRUE(SetupEngine());
+ EXPECT_TRUE(SetupEngineWithSendStream());
int channel_num = voe_.GetLastChannel();
// Ensure extensions are off by default.
@@ -235,12 +235,9 @@ class WebRtcVoiceEngineTestFake : public testing::Test {
EXPECT_TRUE(channel_->SetSendParameters(send_parameters_));
EXPECT_EQ(id, voe_.GetSendRtpExtensionId(channel_num, ext));
- // Ensure extension is set properly on new channel.
- // The first stream to occupy the default channel.
- EXPECT_TRUE(channel_->AddSendStream(
- cricket::StreamParams::CreateLegacy(123)));
+ // Ensure extension is set properly on new channels.
EXPECT_TRUE(channel_->AddSendStream(
- cricket::StreamParams::CreateLegacy(234)));
+ cricket::StreamParams::CreateLegacy(kSsrc2)));
int new_channel_num = voe_.GetLastChannel();
EXPECT_NE(channel_num, new_channel_num);
EXPECT_EQ(id, voe_.GetSendRtpExtensionId(new_channel_num, ext));
@@ -3079,25 +3076,26 @@ TEST_F(WebRtcVoiceEngineTestFake, DeliverAudioPacket_Call) {
EXPECT_EQ(2, s->received_packets());
}
+// TODO(solenberg): !!!!!!
pthatcher1 2015/10/01 19:57:56 You're going to fix this, right?
the sun 2015/10/13 15:07:03 Oh yes.
// All receive channels should be associated with the default send channel,
// since they do not send RTCP SR.
-TEST_F(WebRtcVoiceEngineTestFake, AssociateDefaultChannelOnConference) {
- EXPECT_TRUE(SetupEngineWithSendStream());
- EXPECT_TRUE(channel_->SetSendParameters(send_parameters_));
- cricket::WebRtcVoiceMediaChannel* media_channel =
- static_cast<cricket::WebRtcVoiceMediaChannel*>(channel_);
- int default_channel = media_channel->voe_channel();
- EXPECT_TRUE(channel_->AddRecvStream(cricket::StreamParams::CreateLegacy(1)));
- int recv_ch = voe_.GetLastChannel();
- EXPECT_NE(recv_ch, default_channel);
- EXPECT_EQ(voe_.GetAssociateSendChannel(recv_ch), default_channel);
- EXPECT_TRUE(channel_->AddSendStream(cricket::StreamParams::CreateLegacy(2)));
- EXPECT_EQ(voe_.GetAssociateSendChannel(recv_ch), default_channel);
- EXPECT_TRUE(channel_->AddRecvStream(cricket::StreamParams::CreateLegacy(3)));
- recv_ch = voe_.GetLastChannel();
- EXPECT_NE(recv_ch, default_channel);
- EXPECT_EQ(voe_.GetAssociateSendChannel(recv_ch), default_channel);
-}
+// TEST_F(WebRtcVoiceEngineTestFake, AssociateDefaultChannelOnConference) {
+// EXPECT_TRUE(SetupEngineWithSendStream());
+// EXPECT_TRUE(channel_->SetSendParameters(send_parameters_));
+// cricket::WebRtcVoiceMediaChannel* media_channel =
+// static_cast<cricket::WebRtcVoiceMediaChannel*>(channel_);
+// int default_channel = media_channel->voe_channel();
+// EXPECT_TRUE(channel_->AddRecvStream(cricket::StreamParams::CreateLegacy(1)));
+// int recv_ch = voe_.GetLastChannel();
+// EXPECT_NE(recv_ch, default_channel);
+// EXPECT_EQ(voe_.GetAssociateSendChannel(recv_ch), default_channel);
+// EXPECT_TRUE(channel_->AddSendStream(cricket::StreamParams::CreateLegacy(2)));
+// EXPECT_EQ(voe_.GetAssociateSendChannel(recv_ch), default_channel);
+// EXPECT_TRUE(channel_->AddRecvStream(cricket::StreamParams::CreateLegacy(3)));
+// recv_ch = voe_.GetLastChannel();
+// EXPECT_NE(recv_ch, default_channel);
+// EXPECT_EQ(voe_.GetAssociateSendChannel(recv_ch), default_channel);
+// }
TEST_F(WebRtcVoiceEngineTestFake, AssociateChannelResetUponDeleteChannnel) {
EXPECT_TRUE(SetupEngineWithSendStream());
« talk/media/webrtc/webrtcvoiceengine.cc ('K') | « talk/media/webrtc/webrtcvoiceengine.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698