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

Unified Diff: webrtc/api/webrtcsession_unittest.cc

Issue 1975453002: Add PeerConnection IsClosed check. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Make it an unique_ptr when passing the TransportController to WebRtcSession. Created 4 years, 6 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
« no previous file with comments | « webrtc/api/webrtcsession.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/webrtcsession_unittest.cc
diff --git a/webrtc/api/webrtcsession_unittest.cc b/webrtc/api/webrtcsession_unittest.cc
index fab5e1a56fcc4cd1c314fbfe84f8f5aeca06f1eb..ff9c66f497b054cbfa9d6db88dcdf3cf0dd94004 100644
--- a/webrtc/api/webrtcsession_unittest.cc
+++ b/webrtc/api/webrtcsession_unittest.cc
@@ -212,17 +212,20 @@ class MockIceObserver : public webrtc::IceObserver {
class WebRtcSessionForTest : public webrtc::WebRtcSession {
public:
- WebRtcSessionForTest(webrtc::MediaControllerInterface* media_controller,
- rtc::Thread* network_thread,
- rtc::Thread* worker_thread,
- rtc::Thread* signaling_thread,
- cricket::PortAllocator* port_allocator,
- webrtc::IceObserver* ice_observer)
+ WebRtcSessionForTest(
+ webrtc::MediaControllerInterface* media_controller,
+ rtc::Thread* network_thread,
+ rtc::Thread* worker_thread,
+ rtc::Thread* signaling_thread,
+ cricket::PortAllocator* port_allocator,
+ webrtc::IceObserver* ice_observer,
+ std::unique_ptr<cricket::TransportController> transport_controller)
: WebRtcSession(media_controller,
network_thread,
worker_thread,
signaling_thread,
- port_allocator) {
+ port_allocator,
+ std::move(transport_controller)) {
RegisterIceObserver(ice_observer);
}
virtual ~WebRtcSessionForTest() {}
@@ -386,7 +389,11 @@ class WebRtcSessionTest
ASSERT_TRUE(session_.get() == NULL);
session_.reset(new WebRtcSessionForTest(
media_controller_.get(), rtc::Thread::Current(), rtc::Thread::Current(),
- rtc::Thread::Current(), allocator_.get(), &observer_));
+ rtc::Thread::Current(), allocator_.get(), &observer_,
+ std::unique_ptr<cricket::TransportController>(
+ new cricket::TransportController(rtc::Thread::Current(),
+ rtc::Thread::Current(),
+ allocator_.get()))));
session_->SignalDataChannelOpenMessage.connect(
this, &WebRtcSessionTest::OnDataChannelOpenMessage);
session_->GetOnDestroyedSignal()->connect(
« no previous file with comments | « webrtc/api/webrtcsession.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698