| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 28 matching lines...) Expand all Loading... |
| 39 #include "webrtc/media/base/fakevideorenderer.h" | 39 #include "webrtc/media/base/fakevideorenderer.h" |
| 40 #include "webrtc/media/base/mediachannel.h" | 40 #include "webrtc/media/base/mediachannel.h" |
| 41 #include "webrtc/media/engine/fakewebrtccall.h" | 41 #include "webrtc/media/engine/fakewebrtccall.h" |
| 42 #include "webrtc/p2p/base/stunserver.h" | 42 #include "webrtc/p2p/base/stunserver.h" |
| 43 #include "webrtc/p2p/base/teststunserver.h" | 43 #include "webrtc/p2p/base/teststunserver.h" |
| 44 #include "webrtc/p2p/base/testturnserver.h" | 44 #include "webrtc/p2p/base/testturnserver.h" |
| 45 #include "webrtc/p2p/base/transportchannel.h" | 45 #include "webrtc/p2p/base/transportchannel.h" |
| 46 #include "webrtc/p2p/client/basicportallocator.h" | 46 #include "webrtc/p2p/client/basicportallocator.h" |
| 47 #include "webrtc/pc/channelmanager.h" | 47 #include "webrtc/pc/channelmanager.h" |
| 48 #include "webrtc/pc/mediasession.h" | 48 #include "webrtc/pc/mediasession.h" |
| 49 #include "webrtc/system_wrappers/include/clock.h" |
| 49 | 50 |
| 50 #define MAYBE_SKIP_TEST(feature) \ | 51 #define MAYBE_SKIP_TEST(feature) \ |
| 51 if (!(feature())) { \ | 52 if (!(feature())) { \ |
| 52 LOG(LS_INFO) << "Feature disabled... skipping"; \ | 53 LOG(LS_INFO) << "Feature disabled... skipping"; \ |
| 53 return; \ | 54 return; \ |
| 54 } | 55 } |
| 55 | 56 |
| 56 using cricket::FakeVoiceMediaChannel; | 57 using cricket::FakeVoiceMediaChannel; |
| 57 using cricket::TransportInfo; | 58 using cricket::TransportInfo; |
| 58 using rtc::SocketAddress; | 59 using rtc::SocketAddress; |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 | 325 |
| 325 class WebRtcSessionTest | 326 class WebRtcSessionTest |
| 326 : public testing::TestWithParam<RTCCertificateGenerationMethod>, | 327 : public testing::TestWithParam<RTCCertificateGenerationMethod>, |
| 327 public sigslot::has_slots<> { | 328 public sigslot::has_slots<> { |
| 328 protected: | 329 protected: |
| 329 // TODO Investigate why ChannelManager crashes, if it's created | 330 // TODO Investigate why ChannelManager crashes, if it's created |
| 330 // after stun_server. | 331 // after stun_server. |
| 331 WebRtcSessionTest() | 332 WebRtcSessionTest() |
| 332 : media_engine_(new cricket::FakeMediaEngine()), | 333 : media_engine_(new cricket::FakeMediaEngine()), |
| 333 data_engine_(new cricket::FakeDataEngine()), | 334 data_engine_(new cricket::FakeDataEngine()), |
| 334 channel_manager_( | 335 channel_manager_(new cricket::ChannelManager(media_engine_, |
| 335 new cricket::ChannelManager(media_engine_, | 336 data_engine_, |
| 336 data_engine_, | 337 rtc::Thread::Current())), |
| 337 rtc::Thread::Current())), | |
| 338 fake_call_(webrtc::Call::Config()), | 338 fake_call_(webrtc::Call::Config()), |
| 339 media_controller_( | 339 media_controller_( |
| 340 webrtc::MediaControllerInterface::Create(cricket::MediaConfig(), | 340 webrtc::MediaControllerInterface::Create(cricket::MediaConfig(), |
| 341 rtc::Thread::Current(), | 341 rtc::Thread::Current(), |
| 342 channel_manager_.get())), | 342 channel_manager_.get(), |
| 343 nullptr /* event_log */)), |
| 343 tdesc_factory_(new cricket::TransportDescriptionFactory()), | 344 tdesc_factory_(new cricket::TransportDescriptionFactory()), |
| 344 desc_factory_( | 345 desc_factory_( |
| 345 new cricket::MediaSessionDescriptionFactory(channel_manager_.get(), | 346 new cricket::MediaSessionDescriptionFactory(channel_manager_.get(), |
| 346 tdesc_factory_.get())), | 347 tdesc_factory_.get())), |
| 347 pss_(new rtc::PhysicalSocketServer), | 348 pss_(new rtc::PhysicalSocketServer), |
| 348 vss_(new rtc::VirtualSocketServer(pss_.get())), | 349 vss_(new rtc::VirtualSocketServer(pss_.get())), |
| 349 fss_(new rtc::FirewallSocketServer(vss_.get())), | 350 fss_(new rtc::FirewallSocketServer(vss_.get())), |
| 350 ss_scope_(fss_.get()), | 351 ss_scope_(fss_.get()), |
| 351 stun_socket_addr_( | 352 stun_socket_addr_( |
| 352 rtc::SocketAddress(kStunAddrHost, cricket::STUN_SERVER_PORT)), | 353 rtc::SocketAddress(kStunAddrHost, cricket::STUN_SERVER_PORT)), |
| (...skipping 3993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4346 } | 4347 } |
| 4347 | 4348 |
| 4348 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 4349 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
| 4349 // currently fails because upon disconnection and reconnection OnIceComplete is | 4350 // currently fails because upon disconnection and reconnection OnIceComplete is |
| 4350 // called more than once without returning to IceGatheringGathering. | 4351 // called more than once without returning to IceGatheringGathering. |
| 4351 | 4352 |
| 4352 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, | 4353 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, |
| 4353 WebRtcSessionTest, | 4354 WebRtcSessionTest, |
| 4354 testing::Values(ALREADY_GENERATED, | 4355 testing::Values(ALREADY_GENERATED, |
| 4355 DTLS_IDENTITY_STORE)); | 4356 DTLS_IDENTITY_STORE)); |
| OLD | NEW |