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

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

Issue 2353033005: Refactoring: move ownership of RtcEventLog from Call to PeerConnection (Closed)
Patch Set: Moved the constructor 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
« no previous file with comments | « webrtc/api/statscollector_unittest.cc ('k') | webrtc/call.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/logging/rtc_event_log/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"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(&event_log_)),
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 &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 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 cricket::RelayServerConfig turn_server(cricket::RELAY_TURN); 1474 cricket::RelayServerConfig turn_server(cricket::RELAY_TURN);
1474 cricket::RelayCredentials credentials(kTurnUsername, kTurnPassword); 1475 cricket::RelayCredentials credentials(kTurnUsername, kTurnPassword);
1475 turn_server.credentials = credentials; 1476 turn_server.credentials = credentials;
1476 turn_server.ports.push_back( 1477 turn_server.ports.push_back(
1477 cricket::ProtocolAddress(kTurnUdpIntAddr, cricket::PROTO_UDP, false)); 1478 cricket::ProtocolAddress(kTurnUdpIntAddr, cricket::PROTO_UDP, false));
1478 allocator_->AddTurnServer(turn_server); 1479 allocator_->AddTurnServer(turn_server);
1479 allocator_->set_step_delay(cricket::kMinimumStepDelay); 1480 allocator_->set_step_delay(cricket::kMinimumStepDelay);
1480 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP); 1481 allocator_->set_flags(cricket::PORTALLOCATOR_DISABLE_TCP);
1481 } 1482 }
1482 1483
1484 webrtc::RtcEventLogNullImpl event_log_;
1483 cricket::FakeMediaEngine* media_engine_; 1485 cricket::FakeMediaEngine* media_engine_;
1484 cricket::FakeDataEngine* data_engine_; 1486 cricket::FakeDataEngine* data_engine_;
1485 std::unique_ptr<cricket::ChannelManager> channel_manager_; 1487 std::unique_ptr<cricket::ChannelManager> channel_manager_;
1486 cricket::FakeCall fake_call_; 1488 cricket::FakeCall fake_call_;
1487 std::unique_ptr<webrtc::MediaControllerInterface> media_controller_; 1489 std::unique_ptr<webrtc::MediaControllerInterface> media_controller_;
1488 std::unique_ptr<cricket::TransportDescriptionFactory> tdesc_factory_; 1490 std::unique_ptr<cricket::TransportDescriptionFactory> tdesc_factory_;
1489 std::unique_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_; 1491 std::unique_ptr<cricket::MediaSessionDescriptionFactory> desc_factory_;
1490 std::unique_ptr<rtc::PhysicalSocketServer> pss_; 1492 std::unique_ptr<rtc::PhysicalSocketServer> pss_;
1491 std::unique_ptr<rtc::VirtualSocketServer> vss_; 1493 std::unique_ptr<rtc::VirtualSocketServer> vss_;
1492 std::unique_ptr<rtc::FirewallSocketServer> fss_; 1494 std::unique_ptr<rtc::FirewallSocketServer> fss_;
(...skipping 2853 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
« no previous file with comments | « webrtc/api/statscollector_unittest.cc ('k') | webrtc/call.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698