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

Side by Side Diff: webrtc/api/webrtcsession_unittest.cc

Issue 2353033005: Refactoring: move ownership of RtcEventLog from Call to PeerConnection (Closed)
Patch Set: Make TSan happy Created 4 years, 2 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 unified diff | Download patch
OLDNEW
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 17 matching lines...) Expand all
28 #include "webrtc/base/gunit.h" 28 #include "webrtc/base/gunit.h"
29 #include "webrtc/base/logging.h" 29 #include "webrtc/base/logging.h"
30 #include "webrtc/base/network.h" 30 #include "webrtc/base/network.h"
31 #include "webrtc/base/physicalsocketserver.h" 31 #include "webrtc/base/physicalsocketserver.h"
32 #include "webrtc/base/ssladapter.h" 32 #include "webrtc/base/ssladapter.h"
33 #include "webrtc/base/sslidentity.h" 33 #include "webrtc/base/sslidentity.h"
34 #include "webrtc/base/sslstreamadapter.h" 34 #include "webrtc/base/sslstreamadapter.h"
35 #include "webrtc/base/stringutils.h" 35 #include "webrtc/base/stringutils.h"
36 #include "webrtc/base/thread.h" 36 #include "webrtc/base/thread.h"
37 #include "webrtc/base/virtualsocketserver.h" 37 #include "webrtc/base/virtualsocketserver.h"
38 #include "webrtc/call/rtc_event_log.h"
38 #include "webrtc/media/base/fakemediaengine.h" 39 #include "webrtc/media/base/fakemediaengine.h"
39 #include "webrtc/media/base/fakevideorenderer.h" 40 #include "webrtc/media/base/fakevideorenderer.h"
40 #include "webrtc/media/base/mediachannel.h" 41 #include "webrtc/media/base/mediachannel.h"
41 #include "webrtc/media/engine/fakewebrtccall.h" 42 #include "webrtc/media/engine/fakewebrtccall.h"
42 #include "webrtc/p2p/base/stunserver.h" 43 #include "webrtc/p2p/base/stunserver.h"
43 #include "webrtc/p2p/base/teststunserver.h" 44 #include "webrtc/p2p/base/teststunserver.h"
44 #include "webrtc/p2p/base/testturnserver.h" 45 #include "webrtc/p2p/base/testturnserver.h"
45 #include "webrtc/p2p/base/transportchannel.h" 46 #include "webrtc/p2p/base/transportchannel.h"
46 #include "webrtc/p2p/client/basicportallocator.h" 47 #include "webrtc/p2p/client/basicportallocator.h"
47 #include "webrtc/pc/channelmanager.h" 48 #include "webrtc/pc/channelmanager.h"
48 #include "webrtc/pc/mediasession.h" 49 #include "webrtc/pc/mediasession.h"
50 #include "webrtc/system_wrappers/include/clock.h"
49 51
50 #define MAYBE_SKIP_TEST(feature) \ 52 #define MAYBE_SKIP_TEST(feature) \
51 if (!(feature())) { \ 53 if (!(feature())) { \
52 LOG(LS_INFO) << "Feature disabled... skipping"; \ 54 LOG(LS_INFO) << "Feature disabled... skipping"; \
53 return; \ 55 return; \
54 } 56 }
55 57
56 using cricket::FakeVoiceMediaChannel; 58 using cricket::FakeVoiceMediaChannel;
57 using cricket::TransportInfo; 59 using cricket::TransportInfo;
58 using rtc::SocketAddress; 60 using rtc::SocketAddress;
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 326
325 class WebRtcSessionTest 327 class WebRtcSessionTest
326 : public testing::TestWithParam<RTCCertificateGenerationMethod>, 328 : public testing::TestWithParam<RTCCertificateGenerationMethod>,
327 public sigslot::has_slots<> { 329 public sigslot::has_slots<> {
328 protected: 330 protected:
329 // TODO Investigate why ChannelManager crashes, if it's created 331 // TODO Investigate why ChannelManager crashes, if it's created
330 // after stun_server. 332 // after stun_server.
331 WebRtcSessionTest() 333 WebRtcSessionTest()
332 : media_engine_(new cricket::FakeMediaEngine()), 334 : media_engine_(new cricket::FakeMediaEngine()),
333 data_engine_(new cricket::FakeDataEngine()), 335 data_engine_(new cricket::FakeDataEngine()),
334 channel_manager_( 336 channel_manager_(new cricket::ChannelManager(media_engine_,
335 new cricket::ChannelManager(media_engine_, 337 data_engine_,
336 data_engine_, 338 rtc::Thread::Current())),
337 rtc::Thread::Current())),
338 fake_call_(webrtc::Call::Config()), 339 fake_call_(webrtc::Call::Config()),
339 media_controller_( 340 media_controller_(
340 webrtc::MediaControllerInterface::Create(cricket::MediaConfig(), 341 webrtc::MediaControllerInterface::Create(cricket::MediaConfig(),
341 rtc::Thread::Current(), 342 rtc::Thread::Current(),
342 channel_manager_.get())), 343 channel_manager_.get(),
344 nullptr /* event_log */)),
343 tdesc_factory_(new cricket::TransportDescriptionFactory()), 345 tdesc_factory_(new cricket::TransportDescriptionFactory()),
344 desc_factory_( 346 desc_factory_(
345 new cricket::MediaSessionDescriptionFactory(channel_manager_.get(), 347 new cricket::MediaSessionDescriptionFactory(channel_manager_.get(),
346 tdesc_factory_.get())), 348 tdesc_factory_.get())),
347 pss_(new rtc::PhysicalSocketServer), 349 pss_(new rtc::PhysicalSocketServer),
348 vss_(new rtc::VirtualSocketServer(pss_.get())), 350 vss_(new rtc::VirtualSocketServer(pss_.get())),
349 fss_(new rtc::FirewallSocketServer(vss_.get())), 351 fss_(new rtc::FirewallSocketServer(vss_.get())),
350 ss_scope_(fss_.get()), 352 ss_scope_(fss_.get()),
351 stun_socket_addr_( 353 stun_socket_addr_(
352 rtc::SocketAddress(kStunAddrHost, cricket::STUN_SERVER_PORT)), 354 rtc::SocketAddress(kStunAddrHost, cricket::STUN_SERVER_PORT)),
(...skipping 3993 matching lines...) Expand 10 before | Expand all | Expand 10 after
4346 } 4348 }
4347 4349
4348 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test 4350 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test
4349 // currently fails because upon disconnection and reconnection OnIceComplete is 4351 // currently fails because upon disconnection and reconnection OnIceComplete is
4350 // called more than once without returning to IceGatheringGathering. 4352 // called more than once without returning to IceGatheringGathering.
4351 4353
4352 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, 4354 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests,
4353 WebRtcSessionTest, 4355 WebRtcSessionTest,
4354 testing::Values(ALREADY_GENERATED, 4356 testing::Values(ALREADY_GENERATED,
4355 DTLS_IDENTITY_STORE)); 4357 DTLS_IDENTITY_STORE));
OLDNEW
« webrtc/DEPS ('K') | « webrtc/api/statscollector_unittest.cc ('k') | webrtc/call.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698