| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2008 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2008 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 cm_->Terminate(); | 142 cm_->Terminate(); |
| 143 } | 143 } |
| 144 | 144 |
| 145 // Test that we fail to create a voice/video channel if the session is unable | 145 // Test that we fail to create a voice/video channel if the session is unable |
| 146 // to create a cricket::TransportChannel | 146 // to create a cricket::TransportChannel |
| 147 TEST_F(ChannelManagerTest, NoTransportChannelTest) { | 147 TEST_F(ChannelManagerTest, NoTransportChannelTest) { |
| 148 EXPECT_TRUE(cm_->Init()); | 148 EXPECT_TRUE(cm_->Init()); |
| 149 transport_controller_->set_fail_channel_creation(true); | 149 transport_controller_->set_fail_channel_creation(true); |
| 150 // The test is useless unless the session does not fail creating | 150 // The test is useless unless the session does not fail creating |
| 151 // cricket::TransportChannel. | 151 // cricket::TransportChannel. |
| 152 ASSERT_TRUE(transport_controller_->CreateTransportChannel_w( | 152 ASSERT_TRUE(transport_controller_->CreateTransportChannel_n( |
| 153 "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP) == nullptr); | 153 "audio", cricket::ICE_CANDIDATE_COMPONENT_RTP) == nullptr); |
| 154 | 154 |
| 155 cricket::VoiceChannel* voice_channel = | 155 cricket::VoiceChannel* voice_channel = |
| 156 cm_->CreateVoiceChannel(&fake_mc_, transport_controller_, | 156 cm_->CreateVoiceChannel(&fake_mc_, transport_controller_, |
| 157 cricket::CN_AUDIO, false, AudioOptions()); | 157 cricket::CN_AUDIO, false, AudioOptions()); |
| 158 EXPECT_TRUE(voice_channel == nullptr); | 158 EXPECT_TRUE(voice_channel == nullptr); |
| 159 cricket::VideoChannel* video_channel = | 159 cricket::VideoChannel* video_channel = |
| 160 cm_->CreateVideoChannel(&fake_mc_, transport_controller_, | 160 cm_->CreateVideoChannel(&fake_mc_, transport_controller_, |
| 161 cricket::CN_VIDEO, false, VideoOptions()); | 161 cricket::CN_VIDEO, false, VideoOptions()); |
| 162 EXPECT_TRUE(video_channel == nullptr); | 162 EXPECT_TRUE(video_channel == nullptr); |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 EXPECT_FALSE(cm_->SetVideoRtxEnabled(false)); | 225 EXPECT_FALSE(cm_->SetVideoRtxEnabled(false)); |
| 226 | 226 |
| 227 // Can set again after terminate. | 227 // Can set again after terminate. |
| 228 cm_->Terminate(); | 228 cm_->Terminate(); |
| 229 EXPECT_TRUE(cm_->SetVideoRtxEnabled(true)); | 229 EXPECT_TRUE(cm_->SetVideoRtxEnabled(true)); |
| 230 cm_->GetSupportedVideoCodecs(&codecs); | 230 cm_->GetSupportedVideoCodecs(&codecs); |
| 231 EXPECT_TRUE(ContainsMatchingCodec(codecs, rtx_codec)); | 231 EXPECT_TRUE(ContainsMatchingCodec(codecs, rtx_codec)); |
| 232 } | 232 } |
| 233 | 233 |
| 234 } // namespace cricket | 234 } // namespace cricket |
| OLD | NEW |