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

Unified Diff: talk/session/media/channel_unittest.cc

Issue 1327933002: Full impl of NnChannel::SetSendParameters and NnChannel::SetRecvParameters (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Got rid of SetChannelOptions 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/session/media/channel_unittest.cc
diff --git a/talk/session/media/channel_unittest.cc b/talk/session/media/channel_unittest.cc
index 03f33a4d135d7c98337786ddb7dcbb9854a9f9ff..16fa7db8461777de96f8c0350251de9fe5155ecb 100644
--- a/talk/session/media/channel_unittest.cc
+++ b/talk/session/media/channel_unittest.cc
@@ -181,8 +181,9 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
this, &ChannelTest<T>::OnMediaChannelError);
channel2_->SignalMediaError.connect(
this, &ChannelTest<T>::OnMediaChannelError);
- channel1_->SignalAutoMuted.connect(
- this, &ChannelTest<T>::OnMediaMuted);
+ // TODO(solenberg): !!!!
+ // channel1_->SignalAutoMuted.connect(
+ // this, &ChannelTest<T>::OnMediaMuted);
pthatcher1 2015/09/04 23:21:16 This is only used by TypingMonitor, which isn't us
the sun 2015/09/08 11:31:12 Pooff: https://codereview.chromium.org/1327033002/
if ((flags1 & DTLS) && (flags2 & DTLS)) {
flags1 = (flags1 & ~SECURE);
flags2 = (flags2 & ~SECURE);
@@ -909,20 +910,20 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
// Test that we can Mute the default channel even though the sending SSRC is
// unknown.
EXPECT_FALSE(media_channel1_->IsStreamMuted(0));
- EXPECT_TRUE(channel1_->MuteStream(0, true));
+ EXPECT_TRUE(channel1_->MuteStream(0, true, nullptr));
EXPECT_TRUE(media_channel1_->IsStreamMuted(0));
- EXPECT_TRUE(channel1_->MuteStream(0, false));
+ EXPECT_TRUE(channel1_->MuteStream(0, false, nullptr));
EXPECT_FALSE(media_channel1_->IsStreamMuted(0));
// Test that we can not mute an unknown SSRC.
- EXPECT_FALSE(channel1_->MuteStream(kSsrc1, true));
+ EXPECT_FALSE(channel1_->MuteStream(kSsrc1, true, nullptr));
SendInitiate();
// After the local session description has been set, we can mute a stream
// with its SSRC.
- EXPECT_TRUE(channel1_->MuteStream(kSsrc1, true));
+ EXPECT_TRUE(channel1_->MuteStream(kSsrc1, true, nullptr));
EXPECT_TRUE(media_channel1_->IsStreamMuted(kSsrc1));
- EXPECT_TRUE(channel1_->MuteStream(kSsrc1, false));
+ EXPECT_TRUE(channel1_->MuteStream(kSsrc1, false, nullptr));
EXPECT_FALSE(media_channel1_->IsStreamMuted(kSsrc1));
}
@@ -1849,30 +1850,6 @@ class VoiceChannelTest
VoiceChannelTest() : Base(kPcmuFrame, sizeof(kPcmuFrame),
kRtcpReport, sizeof(kRtcpReport)) {
}
-
- void TestSetChannelOptions() {
- CreateChannels(0, 0);
-
- cricket::AudioOptions options1;
- options1.echo_cancellation.Set(false);
- cricket::AudioOptions options2;
- options2.echo_cancellation.Set(true);
-
- channel1_->SetChannelOptions(options1);
- channel2_->SetChannelOptions(options1);
- cricket::AudioOptions actual_options;
- ASSERT_TRUE(media_channel1_->GetOptions(&actual_options));
- EXPECT_EQ(options1, actual_options);
- ASSERT_TRUE(media_channel2_->GetOptions(&actual_options));
- EXPECT_EQ(options1, actual_options);
-
- channel1_->SetChannelOptions(options2);
- channel2_->SetChannelOptions(options2);
- ASSERT_TRUE(media_channel1_->GetOptions(&actual_options));
- EXPECT_EQ(options2, actual_options);
- ASSERT_TRUE(media_channel2_->GetOptions(&actual_options));
- EXPECT_EQ(options2, actual_options);
- }
};
// override to add NULL parameter
@@ -1939,28 +1916,6 @@ class VideoChannelTest
VideoChannelTest() : Base(kH264Packet, sizeof(kH264Packet),
kRtcpReport, sizeof(kRtcpReport)) {
}
-
- void TestSetChannelOptions() {
- CreateChannels(0, 0);
-
- cricket::VideoOptions o1, o2;
- o1.video_noise_reduction.Set(true);
-
- channel1_->SetChannelOptions(o1);
- channel2_->SetChannelOptions(o1);
- EXPECT_TRUE(media_channel1_->GetOptions(&o2));
- EXPECT_EQ(o1, o2);
- EXPECT_TRUE(media_channel2_->GetOptions(&o2));
- EXPECT_EQ(o1, o2);
-
- o1.video_start_bitrate.Set(123);
- channel1_->SetChannelOptions(o1);
- channel2_->SetChannelOptions(o1);
- EXPECT_TRUE(media_channel1_->GetOptions(&o2));
- EXPECT_EQ(o1, o2);
- EXPECT_TRUE(media_channel2_->GetOptions(&o2));
- EXPECT_EQ(o1, o2);
- }
};
@@ -2133,10 +2088,10 @@ TEST_F(VoiceChannelTest, TestVoiceSpecificMuteStream) {
CreateChannels(0, 0);
EXPECT_FALSE(media_channel1_->IsStreamMuted(0));
EXPECT_FALSE(mute_callback_recved_);
- EXPECT_TRUE(channel1_->MuteStream(0, true));
+ EXPECT_TRUE(channel1_->MuteStream(0, true, nullptr));
EXPECT_TRUE(media_channel1_->IsStreamMuted(0));
EXPECT_FALSE(mute_callback_recved_);
- EXPECT_TRUE(channel1_->MuteStream(0, false));
+ EXPECT_TRUE(channel1_->MuteStream(0, false, nullptr));
EXPECT_FALSE(media_channel1_->IsStreamMuted(0));
EXPECT_FALSE(mute_callback_recved_);
}
@@ -2363,10 +2318,6 @@ TEST_F(VoiceChannelTest, SendBundleToBundleWithRtcpMuxSecure) {
kAudioPts, ARRAY_SIZE(kAudioPts), true, true);
}
-TEST_F(VoiceChannelTest, TestSetChannelOptions) {
- TestSetChannelOptions();
-}
-
// VideoChannelTest
TEST_F(VideoChannelTest, TestInit) {
Base::TestInit();
@@ -2673,10 +2624,6 @@ TEST_F(VideoChannelTest, TestApplyViewRequest) {
EXPECT_EQ(0, send_format.height);
}
-TEST_F(VideoChannelTest, TestSetChannelOptions) {
- TestSetChannelOptions();
-}
-
// DataChannelTest

Powered by Google App Engine
This is Rietveld 408576698