Chromium Code Reviews| Index: talk/session/media/channel_unittest.cc |
| diff --git a/talk/session/media/channel_unittest.cc b/talk/session/media/channel_unittest.cc |
| index 9fef65ffd1b868de6e98e8c5b6a2d4750290ab0e..5127a1f943332778f08f191d9388e679f35e21fc 100644 |
| --- a/talk/session/media/channel_unittest.cc |
| +++ b/talk/session/media/channel_unittest.cc |
| @@ -139,9 +139,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> { |
| rtp_packet_(reinterpret_cast<const char*>(rtp_data), rtp_len), |
| rtcp_packet_(reinterpret_cast<const char*>(rtcp_data), rtcp_len), |
| media_info_callbacks1_(), |
| - media_info_callbacks2_(), |
| - ssrc_(0), |
| - error_(T::MediaChannel::ERROR_NONE) {} |
| + media_info_callbacks2_() {} |
| void CreateChannels(int flags1, int flags2) { |
| CreateChannels(new typename T::MediaChannel(NULL, typename T::Options()), |
| @@ -163,10 +161,6 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> { |
| this, &ChannelTest<T>::OnMediaMonitor); |
| channel2_->SignalMediaMonitor.connect( |
| this, &ChannelTest<T>::OnMediaMonitor); |
| - channel1_->SignalMediaError.connect( |
| - this, &ChannelTest<T>::OnMediaChannelError); |
| - channel2_->SignalMediaError.connect( |
| - this, &ChannelTest<T>::OnMediaChannelError); |
| if ((flags1 & DTLS) && (flags2 & DTLS)) { |
| flags1 = (flags1 & ~SECURE); |
| flags2 = (flags2 & ~SECURE); |
| @@ -472,13 +466,6 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> { |
| } |
| } |
| - void OnMediaChannelError(typename T::Channel* channel, |
| - uint32 ssrc, |
| - typename T::MediaChannel::Error error) { |
| - ssrc_ = ssrc; |
| - error_ = error; |
| - } |
| - |
| void AddLegacyStreamInContent(uint32 ssrc, int flags, |
| typename T::Content* content) { |
| // Base implementation. |
| @@ -1677,15 +1664,6 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> { |
| EXPECT_TRUE(CheckRtcp2()); |
| } |
| - void TestChangeStateError() { |
| - CreateChannels(RTCP, RTCP); |
| - EXPECT_TRUE(SendInitiate()); |
| - media_channel2_->set_fail_set_send(true); |
| - EXPECT_TRUE(channel2_->Enable(true)); |
| - EXPECT_EQ(cricket::VoiceMediaChannel::ERROR_REC_DEVICE_OPEN_FAILED, |
| - error_); |
| - } |
| - |
| void TestSrtpError(int pl_type) { |
| // For Audio, only pl_type 0 is added to the bundle filter. |
| // For Video, only pl_type 97 is added to the bundle filter. |
| @@ -1715,26 +1693,21 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> { |
| // Testing failures in sending packets. |
| EXPECT_FALSE(media_channel2_->SendRtp(kBadPacket, sizeof(kBadPacket))); |
| - // The first failure will trigger an error. |
| - EXPECT_EQ_WAIT(T::MediaChannel::ERROR_REC_SRTP_ERROR, error_, 500); |
| - error_ = T::MediaChannel::ERROR_NONE; |
| // The next 1 sec failures will not trigger an error. |
| EXPECT_FALSE(media_channel2_->SendRtp(kBadPacket, sizeof(kBadPacket))); |
| // Wait for a while to ensure no message comes in. |
| rtc::Thread::Current()->ProcessMessages(210); |
| - EXPECT_EQ(T::MediaChannel::ERROR_NONE, error_); |
| // The error will be triggered again. |
| EXPECT_FALSE(media_channel2_->SendRtp(kBadPacket, sizeof(kBadPacket))); |
| - EXPECT_EQ_WAIT(T::MediaChannel::ERROR_REC_SRTP_ERROR, error_, 500); |
| // Testing failures in receiving packets. |
| - error_ = T::MediaChannel::ERROR_NONE; |
| - cricket::TransportChannel* transport_channel = |
| - channel2_->transport_channel(); |
| - transport_channel->SignalReadPacket( |
| - transport_channel, reinterpret_cast<const char*>(kBadPacket), |
| - sizeof(kBadPacket), rtc::PacketTime(), 0); |
| - EXPECT_EQ_WAIT(T::MediaChannel::ERROR_PLAY_SRTP_ERROR, error_, 500); |
| + // TODO(solenberg): !!!!! |
|
pthatcher1
2015/09/25 17:18:52
You're going to fix this right?
|
| + // cricket::TransportChannel* transport_channel = |
| + // channel2_->transport_channel(); |
| + // transport_channel->SignalReadPacket( |
| + // transport_channel, reinterpret_cast<const char*>(kBadPacket), |
| + // sizeof(kBadPacket), rtc::PacketTime(), 0); |
| + // EXPECT_EQ_WAIT(T::MediaChannel::ERROR_PLAY_SRTP_ERROR, error_, 500); |
| } |
| void TestOnReadyToSend() { |
| @@ -1802,9 +1775,6 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> { |
| std::string rtcp_packet_; |
| int media_info_callbacks1_; |
| int media_info_callbacks2_; |
| - |
| - uint32 ssrc_; |
| - typename T::MediaChannel::Error error_; |
| }; |
| template<> |
| @@ -2168,10 +2138,6 @@ TEST_F(VoiceChannelTest, TestFlushRtcp) { |
| Base::TestFlushRtcp(); |
| } |
| -TEST_F(VoiceChannelTest, TestChangeStateError) { |
| - Base::TestChangeStateError(); |
| -} |
| - |
| TEST_F(VoiceChannelTest, TestSrtpError) { |
| Base::TestSrtpError(kAudioPts[0]); |
| } |
| @@ -2524,8 +2490,6 @@ TEST_F(VideoChannelTest, SendBundleToBundleWithRtcpMuxSecure) { |
| kVideoPts, ARRAY_SIZE(kVideoPts), true, true); |
| } |
| -// TODO(gangji): Add VideoChannelTest.TestChangeStateError. |
| - |
| TEST_F(VideoChannelTest, TestSrtpError) { |
| Base::TestSrtpError(kVideoPts[0]); |
| } |