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

Unified Diff: webrtc/pc/channelmanager_unittest.cc

Issue 2614263002: Remove BaseChannel's dependency on TransportController. (Closed)
Patch Set: cr comments Created 3 years, 11 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
« webrtc/pc/channel.cc ('K') | « webrtc/pc/channelmanager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/channelmanager_unittest.cc
diff --git a/webrtc/pc/channelmanager_unittest.cc b/webrtc/pc/channelmanager_unittest.cc
index 30d2fe5879e1e93d05c73be30897d0201f410448..34d9108cff888b35717a9649fde9a149a2fa231c 100644
--- a/webrtc/pc/channelmanager_unittest.cc
+++ b/webrtc/pc/channelmanager_unittest.cc
@@ -102,17 +102,23 @@ TEST_F(ChannelManagerTest, StartupShutdownOnThread) {
// Test that we can create and destroy a voice and video channel.
TEST_F(ChannelManagerTest, CreateDestroyChannels) {
EXPECT_TRUE(cm_->Init());
+ cricket::TransportChannel* rtp_transport =
+ transport_controller_->CreateTransportChannel(
+ cricket::CN_AUDIO, cricket::ICE_CANDIDATE_COMPONENT_RTP);
cricket::VoiceChannel* voice_channel = cm_->CreateVoiceChannel(
- &fake_mc_, transport_controller_, cricket::CN_AUDIO, nullptr,
- kDefaultRtcpEnabled, kDefaultSrtpRequired, AudioOptions());
+ &fake_mc_, rtp_transport, nullptr /*rtcp_transport*/,
+ rtc::Thread::Current(), cricket::CN_AUDIO, nullptr, kDefaultRtcpEnabled,
+ kDefaultSrtpRequired, AudioOptions());
EXPECT_TRUE(voice_channel != nullptr);
cricket::VideoChannel* video_channel = cm_->CreateVideoChannel(
- &fake_mc_, transport_controller_, cricket::CN_VIDEO, nullptr,
- kDefaultRtcpEnabled, kDefaultSrtpRequired, VideoOptions());
+ &fake_mc_, rtp_transport, nullptr /*rtcp_transport*/,
+ rtc::Thread::Current(), cricket::CN_VIDEO, nullptr, kDefaultRtcpEnabled,
+ kDefaultSrtpRequired, VideoOptions());
EXPECT_TRUE(video_channel != nullptr);
cricket::RtpDataChannel* rtp_data_channel = cm_->CreateRtpDataChannel(
- &fake_mc_, transport_controller_, cricket::CN_DATA, nullptr,
- kDefaultRtcpEnabled, kDefaultSrtpRequired);
+ &fake_mc_, rtp_transport, nullptr /*rtcp_transport*/,
+ rtc::Thread::Current(), cricket::CN_DATA, nullptr, kDefaultRtcpEnabled,
+ kDefaultSrtpRequired);
EXPECT_TRUE(rtp_data_channel != nullptr);
cm_->DestroyVideoChannel(video_channel);
cm_->DestroyVoiceChannel(voice_channel);
@@ -130,17 +136,23 @@ TEST_F(ChannelManagerTest, CreateDestroyChannelsOnThread) {
delete transport_controller_;
transport_controller_ =
new cricket::FakeTransportController(&network_, ICEROLE_CONTROLLING);
+ cricket::TransportChannel* rtp_transport =
+ transport_controller_->CreateTransportChannel(
+ cricket::CN_AUDIO, cricket::ICE_CANDIDATE_COMPONENT_RTP);
cricket::VoiceChannel* voice_channel = cm_->CreateVoiceChannel(
- &fake_mc_, transport_controller_, cricket::CN_AUDIO, nullptr,
- kDefaultRtcpEnabled, kDefaultSrtpRequired, AudioOptions());
+ &fake_mc_, rtp_transport, nullptr /*rtcp_transport*/,
+ rtc::Thread::Current(), cricket::CN_AUDIO, nullptr, kDefaultRtcpEnabled,
+ kDefaultSrtpRequired, AudioOptions());
EXPECT_TRUE(voice_channel != nullptr);
cricket::VideoChannel* video_channel = cm_->CreateVideoChannel(
- &fake_mc_, transport_controller_, cricket::CN_VIDEO, nullptr,
- kDefaultRtcpEnabled, kDefaultSrtpRequired, VideoOptions());
+ &fake_mc_, rtp_transport, nullptr /*rtcp_transport*/,
+ rtc::Thread::Current(), cricket::CN_VIDEO, nullptr, kDefaultRtcpEnabled,
+ kDefaultSrtpRequired, VideoOptions());
EXPECT_TRUE(video_channel != nullptr);
cricket::RtpDataChannel* rtp_data_channel = cm_->CreateRtpDataChannel(
- &fake_mc_, transport_controller_, cricket::CN_DATA, nullptr,
- kDefaultRtcpEnabled, kDefaultSrtpRequired);
+ &fake_mc_, rtp_transport, nullptr /*rtcp_transport*/,
+ rtc::Thread::Current(), cricket::CN_DATA, nullptr, kDefaultRtcpEnabled,
+ kDefaultSrtpRequired);
EXPECT_TRUE(rtp_data_channel != nullptr);
cm_->DestroyVideoChannel(video_channel);
cm_->DestroyVoiceChannel(voice_channel);
« webrtc/pc/channel.cc ('K') | « webrtc/pc/channelmanager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698